summaryrefslogtreecommitdiffstats
path: root/common/src/main
diff options
context:
space:
mode:
authorGOPINATH MATHIVANAN <gopinath.mathivanan@in.ibm.com>2018-09-04 12:57:51 +0530
committerGOPINATH MATHIVANAN <gopinath.mathivanan@in.ibm.com>2018-09-04 13:04:44 +0530
commit1f3fb927caed1f951f8c65f58623549c73121191 (patch)
tree2600c760b68bf4f85171a7faefa98766e3436270 /common/src/main
parentb1c2cbe73420cbb62f643488422f174fe3311b1c (diff)
fixing Sonar reported log issue
Fixed Sonar reported vulnerability in LoggerStartupListener Issue-ID: SO-962 Change-Id: Icc82d8de94c8ea3c4cd27133e833e2d499e8670d Signed-off-by: GOPINATH MATHIVANAN <gopinath.mathivanan@in.ibm.com>
Diffstat (limited to 'common/src/main')
-rw-r--r--common/src/main/java/org/onap/so/logger/LoggerStartupListener.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/src/main/java/org/onap/so/logger/LoggerStartupListener.java b/common/src/main/java/org/onap/so/logger/LoggerStartupListener.java
index 0d20dd8bf9..1ed18eae0f 100644
--- a/common/src/main/java/org/onap/so/logger/LoggerStartupListener.java
+++ b/common/src/main/java/org/onap/so/logger/LoggerStartupListener.java
@@ -15,6 +15,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
+ * Modifications Copyright (C) 2018 IBM.
* ============LICENSE_END=========================================================
*/
@@ -23,6 +24,7 @@ package org.onap.so.logger;
import java.net.InetAddress;
import java.net.UnknownHostException;
+import org.onap.so.utils.UUIDChecker;
import org.springframework.stereotype.Component;
import ch.qos.logback.classic.Level;
@@ -37,6 +39,7 @@ import ch.qos.logback.core.spi.LifeCycle;
public class LoggerStartupListener extends ContextAwareBase implements LoggerContextListener, LifeCycle {
private boolean started = false;
+ private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.GENERAL, LoggerStartupListener.class);
@Override
public void start() {
@@ -46,7 +49,8 @@ public class LoggerStartupListener extends ContextAwareBase implements LoggerCon
try {
addr = InetAddress.getLocalHost();
} catch (UnknownHostException e) {
- e.printStackTrace();
+ LOGGER.error("UnknownHostException",e);
+
}
Context context = getContext();
if (addr != null) {