From 528d052c10c216301f7f1e3d6611f86e04942e55 Mon Sep 17 00:00:00 2001 From: Yucel Okcu Date: Thu, 14 May 2020 14:31:18 +0300 Subject: [PATCH] fixup! Add loggerFinishAndExit for log file consistency --- src/util/logger.ts | 4 ++-- src/util/process.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/logger.ts b/src/util/logger.ts index bba5a18..36064bd 100644 --- a/src/util/logger.ts +++ b/src/util/logger.ts @@ -50,7 +50,7 @@ fileTransport.on("open", () => { }); }); -const waitForLoggerFinish = (): Promise => new Promise((resolve): void => { +const finishLogger = (): Promise => new Promise((resolve): void => { fileLogWatcher.on("finish", (): void => { resolve(); }); @@ -59,5 +59,5 @@ const waitForLoggerFinish = (): Promise => new Promise((resolve): void => export default logger; export { - waitForLoggerFinish + finishLogger }; \ No newline at end of file diff --git a/src/util/process.ts b/src/util/process.ts index ffe23d5..98d6841 100644 --- a/src/util/process.ts +++ b/src/util/process.ts @@ -1,7 +1,7 @@ -import { waitForLoggerFinish } from "./logger"; +import { finishLogger } from "./logger"; const gracefulExit = async (exitCode = 0): Promise => { - await waitForLoggerFinish(); + await finishLogger(); process.exit(exitCode); };