Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-877

Overriding logging level for a Class file not working

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • None
    • logback-access
    • None
    • Linux/Windows

    Description

      I'm trying to set the log level to debug for a specific class file. It does not seem to work, whereas for a package it works perfectly fine.

      my logback configurations are as follows:

      <appender name="file2" class="ch.qos.logback.core.rolling.RollingFileAppender">
      <!--See http://logback.qos.ch/manual/appenders.html#RollingFileAppender-->
      <!--and http://logback.qos.ch/manual/appenders.html#TimeBasedRollingPolicy-->
      <!-for further documentation->
      <File>${catalina.home}/logs/testClass-logback.log</File>
      <Append>true</Append>
      <encoder>
      <pattern>%-5p | %d

      {ISO8601}

      | %t | %m | %X

      {logUID}

      %n</pattern>
      </encoder>
      <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
      <fileNamePattern>${catalina.home}/logs/testClass-logback.log.%d

      {.yyyy-MM-dd}

      </fileNamePattern>
      </rollingPolicy>
      </appender>

      <logger name="com.pack1.pack2.paack3.ClassName" additivity="false" level="debug">
      <appender-ref ref="file1"/>
      </logger>

      Attachments

        Activity

          People

            logback-dev Logback dev list
            donald26 donald fernandes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: