Webpack-dev-server: HMR logging info message when clientLogLevel is not set to info

Created on 19 Nov 2017  路  5Comments  路  Source: webpack/webpack-dev-server

  • Operating System: Windows
  • Node Version: 8.8.1
  • NPM Version: 5.4.2
  • webpack Version: 3.8.1
  • webpack-dev-server Version: 2.9.4
  • [x] This is a bug
  • [ ] This is a feature request
  • [ ] This is a modification request

Code

// webpack.config.js
...
devServer: {
    clientLogLevel: 'warning',
    hot: true
}
...

Expected Behavior

HMR info messages are not logged unless clientLogLevel is set to info.

Actual Behavior

The info message [HMR] Waiting for update signal from WDS... is always logged. Other logged messages work correctly.


I believe this is caused by the log-level socket (which sets HMR log level) happening after the message is logged (location where it is logged)

I'm not sure how this would be fixed but I'm happy to open a PR if someone has a solution and it isn't too difficult.

3 (important) 4 (inconvenient) bug

Most helpful comment

webpack Version: 4.28.3
webpack-dev-server Version: 3.1.14

with the devServer clientLogLevel set to 'warning' I can still see the [HMR] Waiting for update signal from WDS... message every time.

Am I doing something wrong?

All 5 comments

We've got this fixed for the v3 beta branch, but would happily review a PR to resolve this for 2.x!

Oh nice, thanks. I had a quick look at the v3 branch but couldn't figure out how it was fixed. I think I'll leave it for now as it is not that big of an issue especially if it is solved in v3.

Should I close this issue?

Well it still looks valid for 2.x, so I'd leave it open. And I don't see v3 being released before Feb.

webpack Version: 4.28.3
webpack-dev-server Version: 3.1.14

with the devServer clientLogLevel set to 'warning' I can still see the [HMR] Waiting for update signal from WDS... message every time.

Am I doing something wrong?

@LeoLozes creators of [HMR] love to spam many logs =) I just forked webpack and manually deleted all the logs

Was this page helpful?
0 / 5 - 0 ratings