diff --git a/lib/Stats.js b/lib/Stats.js index fb3104916..11d8fd50b 100644 --- a/lib/Stats.js +++ b/lib/Stats.js @@ -199,7 +199,10 @@ class Stats { options.publicPath, !forToString ); - const showLogging = optionOrLocalFallback(options.logging, !forToString); + const showLogging = optionOrLocalFallback( + options.logging, + forToString ? "info" : true + ); const showLoggingTrace = optionOrLocalFallback( options.loggingTrace, !forToString diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index 4b9383388..34724bc4c 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -2012,7 +2012,13 @@ Entrypoint main = main.js [2] ./b.js 22 bytes {2} [built] [3] ./c.js 54 bytes {3} [built] [4] ./d.js 22 bytes {1} [built] -[5] ./e.js 22 bytes {1} [built]" +[5] ./e.js 22 bytes {1} [built] + +LOG from MyPlugin + Error + Warning + Info ++ 7 hidden lines" `; exports[`StatsTestCases should print correct stats for preset-normal-performance 1`] = `