-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Description
This is driven by discussion in #4486.
I've started some work on a PR but would like to use this issue to discuss the operations this endpoint would provide as well as some implementation details.
This endpoint would be based on Boot's logging abstraction (LoggingSystem) and would provide the following operations:
- get a list all known loggers
- get a logger details by its name
- set level for a give logger
ATM LoggingSystem implementations internally keep their mappings between Boot's LogLevel and their native log levels. This is used when setting the log levels, which is already supported by logging abstraction. However, with this PR logging abstraction would also need to support get operations which in turn requires resolution of log levels in other direction (resolve LogLevel for given native log level).
I've originally considered making the level mappings bi-directional but this isn't possible since the mappings are not one-on-one in LogbackLoggingSystem and JavaLoggingSystem (see LogLevel.FATAL). Other idea would be to keep the cache of Boot's LogLevels for each registered logger. This cache would be initially populated during initialization of LoggingSystem.
@snicoll any thoughts on this?