From 74f309f00ee86d768378573598cb9c338fffbd9f Mon Sep 17 00:00:00 2001 From: Ittay Stern Date: Tue, 3 Dec 2019 20:38:44 +0200 Subject: Sink all Async-Jobs logging to same debug.log Error events are _replicated_ to error.log Main incentive is to have all JobWorker, ResourceCommand and MsoResultHandlerService logging the job life-cycle on same page. Issue-ID: VID-253 Change-Id: I862b408d71767ca3d5e6da3071bbae751261587e Signed-off-by: Ittay Stern --- .../src/main/java/org/onap/vid/job/command/RootServiceCommand.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vid-app-common/src/main/java/org/onap/vid/job/command/RootServiceCommand.kt') diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/RootServiceCommand.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/RootServiceCommand.kt index c4680b2bd..875de66d6 100644 --- a/vid-app-common/src/main/java/org/onap/vid/job/command/RootServiceCommand.kt +++ b/vid-app-common/src/main/java/org/onap/vid/job/command/RootServiceCommand.kt @@ -71,13 +71,13 @@ abstract class RootServiceCommand @Autowired constructor( try { val requests = auditService.retrieveRequestsFromMsoByServiceIdAndRequestTypeAndScope(serviceInstanceId, requestType, scope) if (requests.isEmpty() || requests[0].requestId == null) { - LOGGER.error("Failed to retrieve requestId with type: $type, scope: $scope for service instanceId $serviceInstanceId ") + LOGGER.error(EELFLoggerDelegate.errorLogger, "Failed to retrieve requestId with type: $type, scope: $scope for service instanceId $serviceInstanceId ") return Job.JobStatus.FAILED } val createMyselfCommand = planResumeMyselfRestCall(requests[0].requestId, sharedData.userId) return executeAndHandleMsoInstanceRequest(createMyselfCommand) } catch (exception: Exception) { - LOGGER.error("Failed to resume instanceId $serviceInstanceId ", exception) + LOGGER.error(EELFLoggerDelegate.errorLogger, "Failed to resume instanceId $serviceInstanceId ", exception) return Job.JobStatus.FAILED } } -- cgit 1.2.3-korg