Skip to content
This repository has been archived by the owner on Apr 8, 2019. It is now read-only.

logLevel does not disable any logging #289

Closed
caribou-code opened this issue Sep 13, 2018 · 8 comments
Closed

logLevel does not disable any logging #289

caribou-code opened this issue Sep 13, 2018 · 8 comments

Comments

@caribou-code
Copy link

  • Operating System: OSX 10.13.4
  • Node Version: 10.9.0
  • NPM Version: 6.0.1
  • webpack Version: 4.18.0
  • webpack-serve Version: 4.18.0

Expected Behavior

Setting logLevel to silent should stop the ridiculous (and largely pointless) flood of information in the console.

Actual Behavior

Any combination of options I've found suggested online do nothing to change the amount of information logged.

Code

serve: {
  port: 3000,
  options: {
    logLevel: 'silent',
    hotClient: {
      logLevel: 'silent',
    },
  },
},

How Do We Reproduce?

  • Apply the above server config option to webpack.config.js.
  • Observe the log level does not change at all when running webpack-serve.

The basic logLevel option is documented here:
https://github.com/webpack-contrib/webpack-serve

The hotClient option is also documented above, but the logLevel option within that is documented here:
https://github.com/webpack-contrib/webpack-hot-client#options

@OliverJAsh
Copy link

I think the correct way to pass in the option is this (according to the TypeScript typings):

serve: {
  port: 3000,
  logLevel: 'silent',
  hotClient: {
    logLevel: 'silent',
  },
},

But in any case, it still doesn't seem to work. I still see warnings in my browser console.

@OliverJAsh
Copy link

Spent 30 minutes investigating, it looks like the logLevel option is successfully passed to webpack-hot-client, but webpack-hot-client is not using it (?).

I think this issue needs to be raised on the webpack-hot-client repo, but I didn't want to do that without a small test case to reproduce the exact issue. Maybe someone else can carry the torch from here…

@OliverJAsh
Copy link

@OliverJAsh
Copy link

Update: found my issue. The setting does work as per my comment, my issue was something completely different (#291).

@alexander-akait
Copy link
Member

@OliverJAsh webpack-hot-client is abandoned by original author, better use webpack-dev-server

@OliverJAsh
Copy link

@evilebottnawi Oh, really? I don't see any note about this in the webpack-hot-client repo. I'm not using it directly, but rather transitively via webpack-serve which uses koa-webpack which uses webpack-hot-client.

Now wondering why we're using webpack-serve instead of webpack-dev-server…

@alexander-akait
Copy link
Member

@OliverJAsh webpack-serve will be deprecated in near future due author abandoned this package too

@alexander-akait
Copy link
Member

DEPRECATED. Please use webpack-dev-server (he is in support and update mode again). Feel free to create a issue if some features are not implemented in webpack-dev-server.

Why deprecated webpack-serve ?

Thanks for using webpack! We apologize for the inconvenience. In the future, we will avoid such situations.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants