-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate server on infrastructure logger #2614
Conversation
serverData.server = server; | ||
} catch (err) { | ||
if (err.name === 'ValidationError') { | ||
log.error(colors.error(options.stats.colors, err.message)); | ||
console.error(colors.error(options.stats.colors, err.message)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use console
let compiler; | ||
|
||
try { | ||
compiler = webpack(config); | ||
} catch (err) { | ||
if (err instanceof webpack.WebpackOptionsValidationError) { | ||
log.error(colors.error(options.stats.colors, err.message)); | ||
console.error(colors.error(options.stats.colors, err.message)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use console
@@ -189,7 +190,8 @@ class Server { | |||
proxyOptions.context = correctedContext; | |||
} | |||
|
|||
proxyOptions.logLevel = proxyOptions.logLevel || 'warn'; | |||
proxyOptions.logLevel = this.compiler.options.infrastructureLogging.level; | |||
proxyOptions.logProvider = () => this.logger; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improve logging for proxy
Codecov Report
@@ Coverage Diff @@
## v4 #2614 +/- ##
==========================================
- Coverage 92.36% 92.25% -0.12%
==========================================
Files 35 34 -1
Lines 1323 1317 -6
Branches 375 370 -5
==========================================
- Hits 1222 1215 -7
- Misses 96 97 +1
Partials 5 5
Continue to review full report at Codecov.
|
ed45604
to
d7b8529
Compare
Seem to be watchpack broken when you have |
8f31674
to
51c76d3
Compare
BREAKING CHANGE: `log`, `logLevel`, `logTime`, `noInfo`, `quiet`, `reporter` and `warn` options were removed in favor built-in webpack logger, please use https://webpack.js.org/configuration/other-options/#infrastructurelogginglevel for enable and setup logging output
51c76d3
to
f3d0431
Compare
For Bugs and Features; did you add new tests?
No, existing tests
Motivation / Use-Case
Use built-in webpack logger for server and dev-middleware
Breaking Changes
Yes
Additional Info
No