My config is the standard
logging:
# The default level of all loggers. Can be OFF, ERROR, WARN, INFO, DEBUG, TRACE, or ALL.
level: INFO
# Logger-spec
I've checked the source code for the log-level
task and its main logic is implemented like this:
for (String loggerName : loggerNames) {
((LoggerContext) loggerContext).getLogger(loggerName).setLevel(loggerLevel);
output.println(String.format("Configured logging level for %s to %s", loggerName, loggerLevel));
output.flush();
}
So the way it's implemented is based on the name for the logger, knowing this I went into the source for org.slf4j.Logger
interface and found this field:
String ROOT_LOGGER_NAME = "ROOT";
Doing a POST
like this solved it for me:
curl -X POST -d "logger=ROOT&level=DEBUG" localhost:8081/tasks/log-level