Skip to content

Config.logLevel / DEVELOCITY_API_LOG_LEVEL should only affect library's loggers #331

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
2 tasks
gabrielfeo opened this issue Oct 29, 2024 · 0 comments · May be fixed by #368
Open
2 tasks

Config.logLevel / DEVELOCITY_API_LOG_LEVEL should only affect library's loggers #331

gabrielfeo opened this issue Oct 29, 2024 · 0 comments · May be fixed by #368

Comments

@gabrielfeo
Copy link
Owner

Config.logLevel / DEVELOCITY_API_LOG_LEVEL internally changes org.slf4j.simpleLogger.defaultLogLevel, which changes level of all loggers, not only the library's as the javadoc says. In practice, this is an issue when the user is using simple-logger and using loggers (or using other dependencies that use loggers), as changing Config.logLevel / DEVELOCITY_API_LOG_LEVEL will unexpectedly affect those loggers.

Planned fix

  • Change the property's implementation to set org.slf4j.simpleLogger.log.<package> instead of org.slf4j.simpleLogger.defaultLogLevel
  • Ensure all library loggers are named for the library's packages (HTTP logger is currently named for okhttp3)

Despite the new behavior matching what the docs currently say ("Changes the default log level for library classes"), this is a breaking change for anyone relying on the current behavior.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant