From d9d72dae9cfc1011aa5cf3326e09aa219e50b462 Mon Sep 17 00:00:00 2001 From: "r.bogacki" Date: Mon, 25 Feb 2019 15:04:45 +0100 Subject: Removed MsoLogger from 'mso-requests-db' Removed MsoLogger from adapters ('mso-requests-db') Replaced MsoLogger with plain slf4j. Refactored login output. Fixed imports. Change-Id: I97fd5981b503b132fbbf4f64047481420c9c5fa6 Issue-ID: LOG-631 Signed-off-by: Robert Bogacki --- .../java/org/onap/so/requestsdb/RequestsDBHelper.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'mso-api-handlers/mso-requests-db/src/main/java/org/onap') diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/requestsdb/RequestsDBHelper.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/requestsdb/RequestsDBHelper.java index ea3ef30827..da72ef985c 100644 --- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/requestsdb/RequestsDBHelper.java +++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/requestsdb/RequestsDBHelper.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (c) 2019 Samsung + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -23,8 +25,9 @@ package org.onap.so.requestsdb; import java.sql.Timestamp; import org.onap.so.db.request.beans.InfraActiveRequests; -import org.onap.so.logger.MsoLogger; import org.onap.so.db.request.client.RequestsDbClient; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Component; @@ -33,7 +36,7 @@ import org.springframework.stereotype.Component; public class RequestsDBHelper { private static final String UNKNOWN = "UNKNOWN"; - private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.APIH, RequestsDBHelper.class); + private static Logger logger = LoggerFactory.getLogger(RequestsDBHelper.class); private String className = this.getClass().getSimpleName() +" class\'s "; private String methodName = ""; private String classMethodMessage = ""; @@ -51,7 +54,7 @@ public class RequestsDBHelper { public void updateInfraSuccessCompletion(String msg, String requestId, String operationalEnvironmentId) { methodName = "updateInfraSuccessCompletion() method."; classMethodMessage = className + " " + methodName; - msoLogger.debug("Begin of " + classMethodMessage); + logger.debug("Begin of {}", classMethodMessage); InfraActiveRequests request = requestsDbClient.getInfraActiveRequestbyRequestId(requestId); @@ -70,7 +73,7 @@ public class RequestsDBHelper { request.setEndTime(endTimeStamp); requestsDbClient.save(request); - msoLogger.debug("End of " + classMethodMessage); + logger.debug("End of {}", classMethodMessage); } @@ -85,7 +88,7 @@ public class RequestsDBHelper { public void updateInfraFailureCompletion(String msg, String requestId, String operationalEnvironmentId) { methodName = "updateInfraFailureCompletion() method."; classMethodMessage = className + " " + methodName; - msoLogger.debug("Begin of " + classMethodMessage); + logger.debug("Begin of {}", classMethodMessage); InfraActiveRequests request = requestsDbClient.getInfraActiveRequestbyRequestId(requestId); request.setRequestStatus("FAILED"); @@ -103,7 +106,7 @@ public class RequestsDBHelper { request.setEndTime(endTimeStamp); requestsDbClient.save(request); - msoLogger.debug("End of " + classMethodMessage); + logger.debug("End of {}", classMethodMessage); } } -- cgit 1.2.3-korg