diff options
author | 2020-10-12 13:15:21 +0200 | |
---|---|---|
committer | 2020-10-15 07:16:34 +0000 | |
commit | d20c5616507c0ecb41bc7cc7b44540392bc5ad32 (patch) | |
tree | 2fc9bed068e86a6b1b46ab950f5562de3eb1066a /src/main/java/org/onap/dcae/restapi/VesRestController.java | |
parent | b79642115955cab02caf2218b6950467db3e06b8 (diff) |
Add logs from external-repo-manager lib
Issue-ID: DCAEGEN2-2478
Signed-off-by: Edyta Krukowska <edyta.krukowska@nokia.com>
Change-Id: If6f4ab2c8fd9a4bf14e2391acc54eb7b25689e21
Diffstat (limited to 'src/main/java/org/onap/dcae/restapi/VesRestController.java')
-rw-r--r-- | src/main/java/org/onap/dcae/restapi/VesRestController.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/onap/dcae/restapi/VesRestController.java b/src/main/java/org/onap/dcae/restapi/VesRestController.java index 0a5930f6..93e428b4 100644 --- a/src/main/java/org/onap/dcae/restapi/VesRestController.java +++ b/src/main/java/org/onap/dcae/restapi/VesRestController.java @@ -61,6 +61,7 @@ public class VesRestController { private static final String EVENT = "event"; private final ApplicationSettings settings; private final Logger requestLogger; + private final Logger logger; private EventSender eventSender; private final HeaderUtils headerUtils; private final GeneralEventValidator generalEventValidator; @@ -69,10 +70,11 @@ public class VesRestController { @Autowired VesRestController(ApplicationSettings settings, @Qualifier("incomingRequestsLogger") Logger incomingRequestsLogger, - @Qualifier("eventSender") EventSender eventSender, HeaderUtils headerUtils, + @Qualifier("errorLog") Logger logger, @Qualifier("eventSender") EventSender eventSender, HeaderUtils headerUtils, StndDefinedDataValidator stndDefinedDataValidator) { this.settings = settings; this.requestLogger = incomingRequestsLogger; + this.logger = logger; this.eventSender = eventSender; this.headerUtils = headerUtils; this.stndDefinedValidator = stndDefinedDataValidator; @@ -113,6 +115,7 @@ public class VesRestController { executeStndDefinedValidation(vesEvents); eventSender.send(vesEvents); } catch (EventValidatorException e) { + logger.error(e.getMessage()); return ResponseEntity.status(e.getApiException().httpStatusCode) .body(e.getApiException().toJSON().toString()); } catch (StndDefinedNamespaceParameterNotDefinedException e) { |