Skip to content

feat(client): respect infrastructureLogging.level on Browser side as well #2889

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions lib/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,8 +551,13 @@ class Server {
}
});

if (this.options.client.logging) {
this.sockWrite([connection], 'logging', this.options.client.logging);
const clientLogLevel =
this.options.client.logging ||
(this.compiler.options.infrastructureLogging &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compilers can be array here

Copy link
Member

@alexander-akait alexander-akait Dec 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally it should be on plugin level (and getting from the compilation), but it is require more complex logic

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note there is getCompilerConfigArray() util.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it should be easy to fix

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I'll fix this tomorrow.

this.compiler.options.infrastructureLogging.level);

if (clientLogLevel) {
this.sockWrite([connection], 'logging', clientLogLevel);
}

if (this.options.hot === true || this.options.hot === 'only') {
Expand Down