diff options
author | r.bogacki <r.bogacki@samsung.com> | 2019-03-14 15:24:57 +0100 |
---|---|---|
committer | r.bogacki <r.bogacki@samsung.com> | 2019-03-18 11:02:58 +0100 |
commit | faa0b29e3b7b1fa23a1444a5d9ac020b3c60dedc (patch) | |
tree | 4839f982eb10e66e587b55b757ffc00dd5f9d30f /adapters/mso-requests-db-adapter/src | |
parent | 4ca3abdffa40e7777a233151f66ee0b4131ed538 (diff) |
Removed MsoLogger class
Bye bye MsoLogger class.
Extracted constants to separated classes.
Fixed imports.
Change-Id: I7c8e0527e7dbd097d3ea93b9dab279354652da47
Issue-ID: LOG-631
Signed-off-by: Robert Bogacki <r.bogacki@samsung.com>
Diffstat (limited to 'adapters/mso-requests-db-adapter/src')
5 files changed, 6 insertions, 8 deletions
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java index f7d718ccdc..09e8cf1d32 100644 --- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java +++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java @@ -32,8 +32,8 @@ import org.onap.so.db.request.beans.ArchivedInfraRequests; import org.onap.so.db.request.beans.InfraActiveRequests; import org.onap.so.db.request.data.repository.ArchivedInfraRequestsRepository; import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository; +import org.onap.so.logger.ErrorCode; import org.onap.so.logger.MessageEnum; -import org.onap.so.logger.MsoLogger; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -148,7 +148,7 @@ public class ArchiveInfraRequestsScheduler { newArchivedReqs.add(archivedInfra); oldInfraReqs.add(iar); } catch(Exception e) { - logger.error("{} {}", MessageEnum.RA_GENERAL_EXCEPTION.toString(), MsoLogger.ErrorCode + logger.error("{} {}", MessageEnum.RA_GENERAL_EXCEPTION.toString(), ErrorCode .UnknownError.getValue(), e); } } diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java index 1027c8a18b..e3867d1b93 100644 --- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java +++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java @@ -38,7 +38,7 @@ import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository; import org.onap.so.db.request.data.repository.OperationStatusRepository; import org.onap.so.db.request.data.repository.ResourceOperationStatusRepository; import org.onap.so.db.request.data.repository.SiteStatusRepository; -import org.onap.so.logger.MsoLogger; +import org.onap.so.logger.ErrorCode; import org.onap.so.requestsdb.RequestsDbConstant; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -128,7 +128,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter { } catch (Exception e) { String error = "Error retrieving MSO Infra Requests DB for Request ID " + requestId; logger.error(error, e); - throw new MsoRequestsDbException(error, MsoLogger.ErrorCode.BusinessProcesssError, e); + throw new MsoRequestsDbException(error, ErrorCode.BusinessProcesssError, e); } } @@ -154,7 +154,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter { } catch (Exception e) { String error = "Error retrieving MSO Infra Requests DB for Request ID " + requestId; logger.error(error,e); - throw new MsoRequestsDbException(error,MsoLogger.ErrorCode.BusinessProcesssError , e); + throw new MsoRequestsDbException(error, ErrorCode.BusinessProcesssError , e); } return request; } diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/exceptions/MsoRequestsDbException.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/exceptions/MsoRequestsDbException.java index e6d736d2ad..16a3a7d427 100644 --- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/exceptions/MsoRequestsDbException.java +++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/exceptions/MsoRequestsDbException.java @@ -24,7 +24,7 @@ package org.onap.so.adapters.requestsdb.exceptions; import javax.xml.ws.WebFault; import org.onap.so.exceptions.MSOException; -import org.onap.so.logger.MsoLogger.ErrorCode; +import org.onap.so.logger.ErrorCode; /** * This class simply extends Exception (without addition additional functionality) diff --git a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/HealthCheckHandlerTest.java b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/HealthCheckHandlerTest.java index 32eb40aed8..75c8f1af52 100644 --- a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/HealthCheckHandlerTest.java +++ b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/HealthCheckHandlerTest.java @@ -30,7 +30,6 @@ import org.junit.runner.RunWith; import org.onap.logging.ref.slf4j.ONAPLogConstants; import org.onap.so.adapters.requestsdb.application.MSORequestDBApplication; import org.onap.so.adapters.requestsdb.application.TestAppender; -import org.onap.so.logger.MsoLogger; import org.springframework.boot.web.server.LocalServerPort; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.client.TestRestTemplate; diff --git a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/MSORequestDBImplTest.java b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/MSORequestDBImplTest.java index 103e216229..963ef7c832 100644 --- a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/MSORequestDBImplTest.java +++ b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/MSORequestDBImplTest.java @@ -46,7 +46,6 @@ import org.onap.so.db.request.beans.OperationStatus; import org.onap.so.db.request.beans.ResourceOperationStatus; import org.onap.so.db.request.data.repository.OperationStatusRepository; import org.onap.so.db.request.data.repository.ResourceOperationStatusRepository; -import org.onap.so.logger.MsoLogger; import org.onap.so.requestsdb.RequestsDbConstant; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; |