From 114f68e03bbaa0b73178050d37c251de0288138d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Maciejewski?= Date: Thu, 23 Apr 2020 00:09:36 +0200 Subject: [PATCH] fix: fix webpack logger usage --- src/BuildTimeReporterWebpackPlugin.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BuildTimeReporterWebpackPlugin.ts b/src/BuildTimeReporterWebpackPlugin.ts index 382abb9..70149f9 100644 --- a/src/BuildTimeReporterWebpackPlugin.ts +++ b/src/BuildTimeReporterWebpackPlugin.ts @@ -73,14 +73,14 @@ export class BuildTimeReporterWebpackPlugin { report.addChunks(compilation.chunks); report.addModules(compilation.modules); } else { - compilation.getLogger(PLUGIN_NAME).warn('trackEmit: could not find report', compilation.hash); + this.compiler.getInfrastructureLogger(PLUGIN_NAME).warn('trackEmit: could not find report', compilation.hash); } }); } private sendStatsWhenDone(): void { this.compiler.hooks.done.tapPromise(PLUGIN_NAME, async (compilation) => { - const logger = compilation.getLogger(PLUGIN_NAME); + const logger = this.compiler.getInfrastructureLogger(PLUGIN_NAME); const report = this.reportsByHash.get(compilation.hash as string); try { if (report) {