Authored by fu

添加日志

@@ -113,6 +113,28 @@ @@ -113,6 +113,28 @@
113 </encoder> 113 </encoder>
114 </appender> 114 </appender>
115 115
  116 + <appender name="QUARTZ_TASK_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
  117 + <file>/Data_new/monitor_logs/uilog/job_log.log</file>
  118 + <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
  119 + <level>DEBUG</level>
  120 + </filter>
  121 + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
  122 + <!-- 按天回滚 daily -->
  123 + <fileNamePattern>
  124 + /Data_new/monitor_logs/uilog/job_log.%d{yyyy-MM-dd}.%i.log.gz
  125 + </fileNamePattern>
  126 + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
  127 + <!-- or whenever the file size reaches 100MB -->
  128 + <maxFileSize>${maxFileSize}</maxFileSize>
  129 + </timeBasedFileNamingAndTriggeringPolicy>
  130 + <!-- 日志最大的历史 60天 -->
  131 + <maxHistory>${maxHistory}</maxHistory>
  132 + </rollingPolicy>
  133 + <encoder>
  134 + <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level - %msg%n</pattern>
  135 + </encoder>
  136 + </appender>
  137 +
116 138
117 <!-- root级别 DEBUG --> 139 <!-- root级别 DEBUG -->
118 <root level="INFO"> 140 <root level="INFO">
@@ -133,6 +155,17 @@ @@ -133,6 +155,17 @@
133 <appender-ref ref="BAN_IP_LOG"/> 155 <appender-ref ref="BAN_IP_LOG"/>
134 </logger> 156 </logger>
135 157
  158 + <logger name="org.quartz" additivity="true">
  159 + <level value="DEBUG"/>
  160 + <appender-ref ref="QUARTZ_TASK_LOG"/>
  161 + </logger>
  162 +
  163 + <logger name="com.yoho.quartz" additivity="true">
  164 + <level value="DEBUG"/>
  165 + <appender-ref ref="QUARTZ_TASK_LOG"/>
  166 + </logger>
  167 +
  168 +
136 <!-- 按照每天生成日志文件 --> 169 <!-- 按照每天生成日志文件 -->
137 <appender name="API_TEST_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender"> 170 <appender name="API_TEST_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
138 <file>/Data_new/monitor_logs/uilog/apiTest.log</file> 171 <file>/Data_new/monitor_logs/uilog/apiTest.log</file>