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

[Feature]: Support loglevel in rsbuild #1582

Closed
10Derozan opened this issue Feb 19, 2024 · 5 comments
Closed

[Feature]: Support loglevel in rsbuild #1582

10Derozan opened this issue Feb 19, 2024 · 5 comments

Comments

@10Derozan
Copy link
Contributor

What problem does this feature solve?

We can custom loglevel in rsbuild and configure different level in different instance.

What does the proposed API look like?

maybe dev.loglevel, output.loglevel.

@chenjiahan
Copy link
Member

Try this:

import { logger } from '@rsbuild/core';

logger.level = 'xxx';

@chenjiahan
Copy link
Member

The above method will affect all instances. We may need to provide a way to configure logLevel for different instances.

@10Derozan
Copy link
Contributor Author

I want that instance is independent, for example, I have created two rsbuild instance, if use

import { logger } from '@rsbuild/core';

logger.level = 'xxx';

The another will be influenced also.

@10Derozan
Copy link
Contributor Author

The above method will affect all instances. We may need to provide a way to configure logLevel for different instances.

Yes, you are right.

@chenjiahan
Copy link
Member

This may be difficult to achieve because the code in Rsbuild does not get the logger from the Rsbuild instance, but directly imports the logger module.

@chenjiahan chenjiahan closed this as not planned Won't fix, can't repro, duplicate, stale Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants