From c48e2bcfdb7de810bd814613e6be01bd810a7305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20My=C5=9Bliwiec?= Date: Tue, 26 Jan 2021 08:10:03 +0100 Subject: [PATCH] fix(common): check if get timestamp is present on logger --- packages/common/services/logger.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/common/services/logger.service.ts b/packages/common/services/logger.service.ts index afd17e73b79..5eebf97ed20 100644 --- a/packages/common/services/logger.service.ts +++ b/packages/common/services/logger.service.ts @@ -154,7 +154,7 @@ export class Logger implements LoggerService { const contextMessage = context ? yellow(`[${context}] `) : ''; const timestampDiff = this.updateAndGetTimestampDiff(isTimeDiffEnabled); const instance = (this.instance as typeof Logger) ?? Logger; - const computedMessage = `${pidMessage}${instance.getTimestamp()} ${contextMessage}${output}${timestampDiff}\n`; + const computedMessage = `${pidMessage}${instance.getTimestamp?.()} ${contextMessage}${output}${timestampDiff}\n`; process[writeStreamType ?? 'stdout'].write(computedMessage); }