Skip to content
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

Merged
merged 1 commit into from
May 19, 2020

Conversation

alexander-akait
Copy link
Member

  • This is a bugfix
  • This is a feature
  • This is a code refactor
  • This is a test update
  • This is a docs update
  • This is a metadata update

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

@alexander-akait alexander-akait changed the base branch from master to v4 May 18, 2020 15:29
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));
Copy link
Member Author

@alexander-akait alexander-akait May 18, 2020

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));
Copy link
Member Author

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;
Copy link
Member Author

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
Copy link

codecov bot commented May 18, 2020

Codecov Report

Merging #2614 into v4 will decrease coverage by 0.11%.
The diff coverage is 79.41%.

Impacted file tree graph

@@            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              
Impacted Files Coverage Δ
lib/servers/WebsocketServer.js 94.11% <0.00%> (ø)
lib/utils/createConfig.js 95.29% <ø> (-0.22%) ⬇️
lib/servers/SockJSServer.js 94.11% <75.00%> (+0.36%) ⬆️
lib/utils/status.js 90.00% <75.00%> (-1.31%) ⬇️
lib/Server.js 95.89% <84.21%> (-0.62%) ⬇️
lib/utils/runOpen.js 100.00% <100.00%> (ø)
lib/utils/findPort.js 100.00% <0.00%> (+11.11%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8235fd3...f3d0431. Read the comment docs.

@alexander-akait alexander-akait force-pushed the migrate-server-on-infrastructure-logger branch from ed45604 to d7b8529 Compare May 18, 2020 15:44
@alexander-akait
Copy link
Member Author

Seem to be watchpack broken when you have chokidar in deps

@alexander-akait alexander-akait force-pushed the migrate-server-on-infrastructure-logger branch 2 times, most recently from 8f31674 to 51c76d3 Compare May 18, 2020 16:06
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
@alexander-akait alexander-akait force-pushed the migrate-server-on-infrastructure-logger branch from 51c76d3 to f3d0431 Compare May 19, 2020 10:35
@alexander-akait alexander-akait merged commit 7fbc635 into v4 May 19, 2020
@alexander-akait alexander-akait deleted the migrate-server-on-infrastructure-logger branch May 19, 2020 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant