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

Give the possibility to configure level for future loggers at runtime #15

Open
toki07 opened this issue Sep 28, 2023 · 2 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@toki07
Copy link

toki07 commented Sep 28, 2023

When setting the log level using SimpleLoggerFactory, it does not apply to loggers created after.
It is confusing, because we should firstly create a logger with a standard log level, to modify it afterwards.

For Exemple

public static void main(String[] args) {
   SimpleLoggerFactory factory = (SimpleLoggerFactory) LoggerFactory.getILoggerFactory();
   factory.setLogLevel(Level.WARN);

   Logger logger = LoggerFactory.getLogger(some.class);
   logger.info("INFO LOGGED");

This log will be shown, but it shouldn't

@toki07 toki07 added the bug Something isn't working label Sep 28, 2023
@GoodforGod GoodforGod added enhancement New feature or request and removed bug Something isn't working labels Sep 30, 2023
@GoodforGod
Copy link
Owner

Version 1.0.0

@GoodforGod
Copy link
Owner

Behavior is identical to original slf4j implementation but I see your point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants