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

Add possibility to hide even startup information when quiet === true #2525

Closed
1 of 2 tasks
marcofugaro opened this issue Apr 20, 2020 · 10 comments
Closed
1 of 2 tasks

Comments

@marcofugaro
Copy link
Contributor

marcofugaro commented Apr 20, 2020

  • Operating System: OSX
  • Node Version: v13.13.0
  • NPM Version: 6.14.4
  • webpack Version: 4.42.1
  • webpack-dev-server Version: 3.10.3
  • Browser: Chrome
  • This is a bug
  • This is a modification request

Code

REPRODUCIBLE REPO

// webpack.config.js
module.exports = {
  devServer: {
    clientLogLevel: 'silent',
    quiet: true,
  }
}

From the documentation

With devServer.quiet enabled, nothing except the initial startup information will be written to the console.

However I want to hide also the startup information.

This happened since #2235, is there a plan to support hiding that information as well again?

Expected Behavior

Nothing should be outputted to the console

Actual Behavior

Screenshot 2020-04-20 at 20 06 57

For Features; What is the motivation and/or use-case for the feature?

I am using webpack-dev-server in a custom webapp builder, where I have my custom logs. Something like create-react-app. I want to decide what is output to the console and what not.

@neberej
Copy link

neberej commented Apr 24, 2020

There is noInfo: true for this scenario.

I use the following settings and see no console output.

 devServer: {
      clientLogLevel: 'silent',
      noInfo: true
    },

@marcofugaro
Copy link
Contributor Author

@neberej I've tried your configuration, it still shows the initial information.

I've made a repro if you want to check it out.

@jquense
Copy link

jquense commented Apr 30, 2020

This is confusing behavior. WDS is explicitly bypassing the configured logger when quiet is true. quiet should mean what is says, no logs

@alexander-akait
Copy link
Member

alexander-akait commented May 25, 2020

@jquense yep, for v4 we migrate on built-in webpack logger (problems doesn't exist), so you can easy disable all logs, for v3 you should use noInfo: true (we can't change it because it is a breaking change)

@thealjey
Copy link

@alexander-akait
even with stats: "errors-warnings", (or even with "none") in webpack.config
I see:

<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:8080/
<i> [webpack-dev-server] On Your Network (IPv4): http://192.168.91.128:8080/
<i> [webpack-dev-server] Content not from webpack is served from '/home/al/Projects/designer/public' directory
<i> [webpack-dev-server] 404s will fallback to '/index.html'
webpack compiled successfully
No issues found.
webpack compiled successfully
No issues found.

I would like to get rid of all the "<i>" lines
(and to someday figure out why it compiles twice on startup)
I have the following package versions:
webpack: 5.51.0
webpack-cli: 4.8.0
webpack-dev-server: 4.0.0

@alexander-akait
Copy link
Member

For logger please use https://webpack.js.org/configuration/other-options/#level

@alexander-akait
Copy link
Member

If you want to hide unnecessary things, please use level: "warn"

@alexander-akait
Copy link
Member

alexander-akait commented Aug 19, 2021

I would like to get rid of all the "<i>" lines

Impossible, because it means info, you can disable colors or your terminal can't support colors, so we use <i> to indicate it is info message

@thealjey
Copy link

@alexander-akait
wow, thank you so much!
this was bugging me for months :)

@meduzen
Copy link

meduzen commented Aug 19, 2021

I would like to get rid of all the "" lines

Impossible, because it means info, you can disable colors or your terminal can't support colors, so we use <i> to indicate it is info message

It’s the first time I see this “output design” choice, so it bugged me too. I understand the intent, but the message is pretty clear by itself. Not sure it needs an additional flag to indicate it’s informative.

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

No branches or pull requests

6 participants