Uploaded image for project: 'Quarkus'
  1. Quarkus
  2. QUARKUS-1156

[GSS](1.11.z) quarkus.log.min-level is not applied to root logger

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • None
    • quarkus-core, team/eng
    • None
    • Undefined

    Description

      quarkus.log.min-level is applied to each categories logger, but not applied to the root logger.

      For example, if TRACE is set to quarkus.log.level and 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
      
      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";
          }
      }
      

      Expected results:
      Trace level messages are not logged in the console.

      Actual results:
      Trace level message has logged in the console.

      ...
      2021-06-24 16:15:14,708 TRACE [org.acm.qui.GreetingResource] (executor-thread-1) Hello RESTEasy
      ...
      

      Attachments

        Issue Links

          Activity

            People

              sbiarozk Sergey Beryozkin
              rhn-support-nagetsum Norito Agetsuma
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: