Why are TRACE level messages logged if the root logger level set to log lower than quarkus.log.min-level?
Issue
If a lower log level than quarkus.log.min-level
is set to the root logger, messages are logged even though the log level is lower than quarkus.log.min-level
.
For example, if TRACE
is set to quarkus.log.level
and then calling org.jboss.logging.Logger#trace(Object message)
method in an application class, implicit quarkus.log.min-level
default value DEBUG
is not applied to the root logger. As a result, the TRACE
level log which is a lower log level than quarkus.log.min-level
, will be logged to the console.
application.properties:
# the default value of min-level is DEBUG
# quarkus.log.min-level=DEBUG
quarkus.log.level=TRACE
GreetingResource.java:
package org.acme.quickstart;
import org.jboss.logging.Logger;
import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
@Path("/hello")
public class GreetingResource {
@Inject
Logger log;
@GET
@Produces(MediaType.TEXT_PLAIN)
public String hello() {
log.trace("Hello RESTEasy");
return "Hello RESTEasy";
}
}
Environment
- Red Hat build of Quarkus (RHBQ)
- 1.11.7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.