From ea356219059574f86a3e071f9837afece4189e08 Mon Sep 17 00:00:00 2001 From: Alex Canessa Date: Fri, 17 Dec 2021 18:16:06 +0100 Subject: [PATCH] fix: show file service log when enabled --- lib/node/file/file.service.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/node/file/file.service.ts b/lib/node/file/file.service.ts index a2d45aa..5cd6f25 100644 --- a/lib/node/file/file.service.ts +++ b/lib/node/file/file.service.ts @@ -26,9 +26,13 @@ export class FileService { async writeFileAsync(fileNameWithoutExtension: string, content: any): Promise { const filePath = this.getFilePath(fileNameWithoutExtension); - console.log(`Writing file '${filePath}'`); + if (this.config.enableLog) { + console.log(`Writing file '${filePath}'`); + } await promises.writeFile(filePath, content); - console.log(`File saved`); + if (this.config.enableLog) { + console.log(`File saved`); + } } private getFilePath(fileNameWithoutExtension: string) {