Skip to content

LogLevel conflict. Always setting level to INFO #1064

@attenzione

Description

@attenzione

Do you want to request a feature or report a bug?

bug

What is the current behavior?
I'm using loglevel in project and it conflicts with webpack-dev-server, because of setLevel.
i'm setting different level, but webpack-dev-server always set it to INFO.

If the current behavior is a bug, please provide the steps to reproduce.

in main.js (common chunk)

import Logger from 'loglevel';
Logger.setLevel(Logger.levels.TRACE); 
console.log(Logger.getLevel()); # => 0, TRACE
# after some time, probably websocket get connection
setTimeout(function () { console.log(Logger.getLevel()); }, 3000); # => 2, INFO

What is the expected behavior?
webpack-dev-server must not change global loglevel, instead must use log.getLogger('webpack-dev-server') to create own logger

If this is a feature request, what is motivation or use case for changing the behavior?

Please mention your webpack and Operating System version.
webpack 3.5.5
webpack-dev-server 2.7.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions