logback %logger{56}, 这56代表什么?

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <property name="LOG_HOME" value="e:/log"/>  
  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <!-- encoders are assigned the type
         ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
    <encoder>
      <pattern>【%-5level】 %d{YYYY-MM-DD HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n</pattern>
    </encoder>
  </appender>
  
  <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> 
       <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> 
          <fileNamePattern>LOG_HOME/logFile.%d{yyyy-MM-dd}.%i.log</fileNamePattern> 
        <maxHistory>30</maxHistory> 
      <timeBasedFileNamingAndTriggeringPolicy
                class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
          <!-- or whenever the file size reaches 64 MB -->
          <maxFileSize>4 KB</maxFileSize>
      </timeBasedFileNamingAndTriggeringPolicy>
    </rollingPolicy> 
    <encoder> 
        <pattern>【%-5level】 %d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %logger{56} - %msg%n</pattern>
      <charset>UTF-8</charset>  
    </encoder> 
  </appender> 

  <root level="debug">
    <appender-ref ref="FILE" />
  </root>
</configuration>请输入代码
泛舟湖上清波郎朗
浏览 915回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java