Skip to content

Commit 4eb2d8d

Browse files
completely remove restore of task logger
1 parent b9de860 commit 4eb2d8d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/logger.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ class Logger {
7575
this.taskLogger = taskLogger;
7676
logger.info(`taskLogger successfully created`);
7777

78-
return taskLogger.restore();
79-
})
80-
.then(() => {
8178
this._listenForNewContainers();
8279

8380
this.state.status = 'ready';
@@ -148,6 +145,7 @@ class Logger {
148145
const containerId = container.Id || container.id;
149146
const containerStatus = container.Status || container.status;
150147
const receivedLoggerId = _.get(container, 'Labels', _.get(container, 'Actor.Attributes'))['io.codefresh.logger.id'];
148+
const runCreationLogic = _.get(container, 'Labels', _.get(container, 'Actor.Attributes'))['io.codefresh.runCreationLogic'];
151149
const stepName = _.get(container, 'Labels', _.get(container, 'Actor.Attributes'))['io.codefresh.logger.stepName'];
152150
const receivedLogSizeLimit = _.get(container,
153151
'Labels',
@@ -199,7 +197,7 @@ class Logger {
199197

200198
this.state[containerId] = { status: ContainerHandlingStatus.INITIALIZING };
201199
logger.info(`Handling container: ${containerId}, status: '${containerStatus}'`);
202-
const stepLogger = this.taskLogger.create(stepName, undefined, true);
200+
const stepLogger = this.taskLogger.create(stepName, undefined, runCreationLogic);
203201
logger.info(`Brought step logger for container: ${containerId}`);
204202

205203

0 commit comments

Comments
 (0)