diff options
author | mojahidi <mojahidul.islam@amdocs.com> | 2017-12-11 19:08:11 +0530 |
---|---|---|
committer | Mojahidul Islam <mojahidul.islam@amdocs.com> | 2017-12-13 04:55:47 +0000 |
commit | b61cc21c17744ef927d4fca32aef6149f1b3910c (patch) | |
tree | 8dc5b1061aba0cfbc3888397d4cc4258e435f5e9 /openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main | |
parent | e0d92f6809fa57adfcd6bfa2770daed363e4a39c (diff) |
Fixed sonar issues - LoggerFactory
Refactored as per previous patch comment
Change-Id: Ia971105a56df62575cd3871e3488b6d2c6903d3c
Issue-ID: SDC-343
Signed-off-by: mojahidi <mojahidul.islam@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main')
-rw-r--r-- | openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/api/LoggerFactory.java | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/api/LoggerFactory.java b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/api/LoggerFactory.java index 65df7899fa..1be2fa21dc 100644 --- a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/api/LoggerFactory.java +++ b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/api/LoggerFactory.java @@ -58,9 +58,9 @@ public class LoggerFactory extends BaseFactory { } private static class NoOpLoggerCreationService implements LoggerCreationService { + private static final Logger NO_OP_LOGGER = new NoOpLogger(); - private static final Logger NO_OP_LOGGER = new Logger() { - + private static class NoOpLogger implements Logger { @Override public String getName() { return "No-Op Logger"; @@ -73,22 +73,27 @@ public class LoggerFactory extends BaseFactory { @Override public void metrics(String msg) { + //this is no_op_method } @Override public void metrics(String msg, Object arg) { + //this is no_op_method } @Override public void metrics(String msg, Object arg1, Object arg2) { + //this is no_op_method } @Override public void metrics(String msg, Object... arguments) { + //this is no_op_method } @Override public void metrics(String msg, Throwable t) { + //this is no_op_method } @Override @@ -98,22 +103,27 @@ public class LoggerFactory extends BaseFactory { @Override public void audit(String msg) { + //this is no_op_method } @Override public void audit(String msg, Object arg) { + //this is no_op_method } @Override public void audit(String msg, Object arg1, Object arg2) { + //this is no_op_method } @Override public void audit(String msg, Object... arguments) { + //this is no_op_method } @Override public void audit(String msg, Throwable t) { + //this is no_op_method } @Override @@ -123,22 +133,27 @@ public class LoggerFactory extends BaseFactory { @Override public void debug(String msg) { + //this is no_op_method } @Override public void debug(String msg, Object arg) { + //this is no_op_method } @Override public void debug(String msg, Object arg1, Object arg2) { + //this is no_op_method } @Override public void debug(String msg, Object... arguments) { + //this is no_op_method } @Override public void debug(String msg, Throwable t) { + //this is no_op_method } @Override @@ -148,22 +163,27 @@ public class LoggerFactory extends BaseFactory { @Override public void info(String msg) { + //this is no_op_method } @Override public void info(String msg, Object arg) { + //this is no_op_method } @Override public void info(String msg, Object arg1, Object arg2) { + //this is no_op_method } @Override public void info(String msg, Object... arguments) { + //this is no_op_method } @Override public void info(String msg, Throwable t) { + //this is no_op_method } @Override @@ -173,22 +193,27 @@ public class LoggerFactory extends BaseFactory { @Override public void warn(String msg) { + //this is no_op_method } @Override public void warn(String msg, Object arg) { + //this is no_op_method } @Override public void warn(String msg, Object... arguments) { + //this is no_op_method } @Override public void warn(String msg, Object arg1, Object arg2) { + //this is no_op_method } @Override public void warn(String msg, Throwable t) { + //this is no_op_method } @Override @@ -198,24 +223,29 @@ public class LoggerFactory extends BaseFactory { @Override public void error(String msg) { + //this is no_op_method } @Override public void error(String msg, Object arg) { + //this is no_op_method } @Override public void error(String msg, Object arg1, Object arg2) { + //this is no_op_method } @Override public void error(String msg, Object... arguments) { + //this is no_op_method } @Override public void error(String msg, Throwable t) { + //this is no_op_method } - }; + } @Override public Logger getLogger(String className) { |