Skip to content

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

Open
@gabrielfeo

Description

@gabrielfeo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions