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/ResourceCommand.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'vid-app-common/src/main/java/org/onap/vid/job/command/ResourceCommand.kt') diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/ResourceCommand.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/ResourceCommand.kt index 97c9f99ce..4477a9f24 100644 --- a/vid-app-common/src/main/java/org/onap/vid/job/command/ResourceCommand.kt +++ b/vid-app-common/src/main/java/org/onap/vid/job/command/ResourceCommand.kt @@ -112,7 +112,7 @@ abstract class ResourceCommand( jobStatus = comulateStatusAndUpdatePropertyIfFinal(jobStatus) try { - Logger.debug("job: ${this.javaClass.simpleName} ${sharedData.jobUuid} $actionPhase ${getActionType()} $internalState $jobStatus $childJobs") + Logger.debug(EELFLoggerDelegate.debugLogger, "job: ${this.javaClass.simpleName} ${sharedData.jobUuid} $actionPhase ${getActionType()} $internalState $jobStatus $childJobs") } catch (e:Exception) { /* do nothing. Just failed to log...*/} if (shallStopJob(jobStatus)) { @@ -121,7 +121,7 @@ abstract class ResourceCommand( } val (nextActionPhase, nextInternalState) = calcNextInternalState(jobStatus, internalState, actionPhase) - Logger.debug("next state for job ${sharedData.jobUuid} is $nextInternalState") + Logger.debug(EELFLoggerDelegate.debugLogger, "next state for job ${sharedData.jobUuid} is $nextInternalState") actionPhase = nextActionPhase internalState = nextInternalState @@ -131,7 +131,7 @@ abstract class ResourceCommand( } jobStatus = getExternalInProgressStatus() - Logger.debug("next status for job ${sharedData.jobUuid} is $jobStatus") + Logger.debug(EELFLoggerDelegate.debugLogger, "next status for job ${sharedData.jobUuid} is $jobStatus") // if (internalState.immediate) return call() //shortcut instead of execute another command return NextCommand(jobStatus, this) } @@ -153,7 +153,7 @@ abstract class ResourceCommand( JobStatus.IN_PROGRESS } catch (exception: AbortingException) { - Logger.error("caught AbortingException. Set job status to FAILED") + Logger.error(EELFLoggerDelegate.errorLogger, "caught AbortingException. Set job status to FAILED") JobStatus.FAILED; } } -- cgit 1.2.3-korg