...
|
...
|
@@ -16,32 +16,13 @@ |
|
|
</encoder>
|
|
|
</appender>
|
|
|
|
|
|
<appender name="RECOMMEND_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
|
<file>${yoho.logs.basedir}/${yoho.bigData.env.namespace}/recommend.log</file>
|
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
|
<!-- daily rollover -->
|
|
|
<fileNamePattern>
|
|
|
${yoho.logs.basedir}/${yoho.bigData.env.namespace}/archived/recommend.%d{yyyy-MM-dd}.%i.log.gz
|
|
|
</fileNamePattern>
|
|
|
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
|
|
<!-- or whenever the file size reaches 100MB -->
|
|
|
<maxFileSize>${yoho.logs.maxFileSize}</maxFileSize>
|
|
|
</timeBasedFileNamingAndTriggeringPolicy>
|
|
|
<!-- keep 30 days' worth of history -->
|
|
|
<maxHistory>${yoho.logs.maxHistory}</maxHistory>
|
|
|
</rollingPolicy>
|
|
|
<encoder>
|
|
|
<pattern>%-1relative - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{0}:%line -- %msg%n</pattern>
|
|
|
</encoder>
|
|
|
</appender>
|
|
|
|
|
|
<!-- DEBUG级别日志 appender -->
|
|
|
<appender name="DEBUG_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
|
|
|
|
<file>${yoho.logs.basedir}/${yoho.bigData.env.namespace}/debug.log</file>
|
|
|
<file>${yoho.logs.basedir}/${yoho.rfid.env.namespace}/debug.log</file>
|
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
|
<!-- daily rollover -->
|
|
|
<fileNamePattern>${yoho.logs.basedir}/${yoho.bigData.env.namespace}/archived/debug.%d{yyyy-MM-dd}.%i.log.gz
|
|
|
<fileNamePattern>${yoho.logs.basedir}/${yoho.rfid.env.namespace}/archived/debug.%d{yyyy-MM-dd}.%i.log.gz
|
|
|
</fileNamePattern>
|
|
|
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
|
|
<!-- or whenever the file size reaches 100MB -->
|
...
|
...
|
@@ -56,35 +37,16 @@ |
|
|
</encoder>
|
|
|
</appender>
|
|
|
|
|
|
<!-- DEBUG级别日志 appender -->
|
|
|
<appender name="TRACE_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
|
<file>${yoho.logs.basedir}/${yoho.bigData.env.namespace}/trace.log</file>
|
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
|
<!-- daily rollover -->
|
|
|
<fileNamePattern>${yoho.logs.basedir}/${yoho.bigData.env.namespace}/archived/trace.%d{yyyy-MM-dd}.%i.log.gz
|
|
|
</fileNamePattern>
|
|
|
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
|
|
<!-- or whenever the file size reaches 100MB -->
|
|
|
<maxFileSize>${yoho.logs.maxFileSize}</maxFileSize>
|
|
|
</timeBasedFileNamingAndTriggeringPolicy>
|
|
|
<!-- keep 30 days' worth of history -->
|
|
|
<maxHistory>${yoho.logs.maxHistory}</maxHistory>
|
|
|
</rollingPolicy>
|
|
|
<encoder>
|
|
|
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS}|%X{X-B3-TraceId:-}|%X{X-B3-SpanId:-}|%X{X-Span-Export:-}|%thread|%msg%n</pattern>
|
|
|
</encoder>
|
|
|
</appender>
|
|
|
|
|
|
<!-- WARN、ERROR级别日志 appender -->
|
|
|
<appender name="WARN_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
|
<file>${yoho.logs.basedir}/${yoho.bigData.env.namespace}/warn-log.log</file>
|
|
|
<file>${yoho.logs.basedir}/${yoho.rfid.env.namespace}/warn-log.log</file>
|
|
|
<!-- 过滤器,过滤掉 TRACE 和 DEBUG 和 INFO 级别的日志 -->
|
|
|
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
|
|
<level>WARN</level>
|
|
|
</filter>
|
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
|
<!-- daily rollover -->
|
|
|
<fileNamePattern>${yoho.logs.basedir}/${yoho.bigData.env.namespace}/archived/warn.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
|
|
<fileNamePattern>${yoho.logs.basedir}/${yoho.rfid.env.namespace}/archived/warn.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
|
|
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
|
|
<!-- or whenever the file size reaches 100MB -->
|
|
|
<maxFileSize>${yoho.logs.maxFileSize}</maxFileSize>
|
...
|
...
|
@@ -97,13 +59,11 @@ |
|
|
</encoder>
|
|
|
</appender>
|
|
|
|
|
|
|
|
|
<!-- 登录时,如果一个IP在一定时间内登录次数过多,记录日志 appender -->
|
|
|
<appender name="IP_LOGIN_MORE_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
|
<file>${yoho.logs.basedir}/${yoho.bigData.env.namespace}/IP_LOGIN_MORE_LOG.log</file>
|
|
|
<appender name="STATIC_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
|
<file>${yoho.logs.basedir}/${yoho.rfid.env.namespace}/static_log.log</file>
|
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
|
<!-- daily rollover -->
|
|
|
<fileNamePattern>${yoho.logs.basedir}/${yoho.bigData.env.namespace}/archived/IP_LOGIN_MORE_LOG.%d{yyyy-MM-dd}.%i.log.gz
|
|
|
<fileNamePattern>${yoho.logs.basedir}/${yoho.rfid.env.namespace}/archived/static_log.%d{yyyy-MM-dd}.%i.log.gz
|
|
|
</fileNamePattern>
|
|
|
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
|
|
<!-- or whenever the file size reaches 100MB -->
|
...
|
...
|
@@ -118,81 +78,8 @@ |
|
|
</encoder>
|
|
|
</appender>
|
|
|
|
|
|
|
|
|
|
|
|
<appender name="SEARCH_STATIC_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
|
<file>${yoho.logs.basedir}/${yoho.bigData.env.namespace}/search_static_log.log</file>
|
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
|
<!-- daily rollover -->
|
|
|
<fileNamePattern>${yoho.logs.basedir}/${yoho.bigData.env.namespace}/archived/search_static_log.%d{yyyy-MM-dd}.%i.log.gz
|
|
|
</fileNamePattern>
|
|
|
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
|
|
<!-- or whenever the file size reaches 100MB -->
|
|
|
<maxFileSize>${yoho.logs.maxFileSize}</maxFileSize>
|
|
|
</timeBasedFileNamingAndTriggeringPolicy>
|
|
|
<!-- keep 30 days' worth of history -->
|
|
|
<maxHistory>${yoho.logs.maxHistory}</maxHistory>
|
|
|
</rollingPolicy>
|
|
|
|
|
|
<encoder>
|
|
|
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
|
|
|
</encoder>
|
|
|
</appender>
|
|
|
|
|
|
|
|
|
<appender name="STATIC_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
|
<file>${yoho.logs.basedir}/${yoho.bigData.env.namespace}/static_log.log</file>
|
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
|
<!-- daily rollover -->
|
|
|
<fileNamePattern>${yoho.logs.basedir}/${yoho.bigData.env.namespace}/archived/static_log.%d{yyyy-MM-dd}.%i.log.gz
|
|
|
</fileNamePattern>
|
|
|
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
|
|
<!-- or whenever the file size reaches 100MB -->
|
|
|
<maxFileSize>${yoho.logs.maxFileSize}</maxFileSize>
|
|
|
</timeBasedFileNamingAndTriggeringPolicy>
|
|
|
<!-- keep 30 days' worth of history -->
|
|
|
<maxHistory>${yoho.logs.maxHistory}</maxHistory>
|
|
|
</rollingPolicy>
|
|
|
|
|
|
<encoder>
|
|
|
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
|
|
|
</encoder>
|
|
|
</appender>
|
|
|
|
|
|
<appender name="BLACK_USER_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
|
<file>${yoho.logs.basedir}/${yoho.bigData.env.namespace}/blackUser.log</file>
|
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
|
<!-- daily rollover -->
|
|
|
<fileNamePattern>
|
|
|
${yoho.logs.basedir}/${yoho.bigData.env.namespace}/archived/blackUser.%d{yyyy-MM-dd}.%i.log.gz
|
|
|
</fileNamePattern>
|
|
|
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
|
|
<!-- or whenever the file size reaches 100MB -->
|
|
|
<maxFileSize>${yoho.logs.maxFileSize}</maxFileSize>
|
|
|
</timeBasedFileNamingAndTriggeringPolicy>
|
|
|
<!-- keep 30 days' worth of history -->
|
|
|
<maxHistory>${yoho.logs.maxHistory}</maxHistory>
|
|
|
</rollingPolicy>
|
|
|
<encoder>
|
|
|
<pattern>%-1relative - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{0}:%line -- %msg%n</pattern>
|
|
|
</encoder>
|
|
|
</appender>
|
|
|
|
|
|
<!-- 数据库操作日志 -->
|
|
|
<logger name="java.sql.PreparedStatement" value="${yoho.logs.level}"/>
|
|
|
<logger name="java.sql.Connection" value="${yoho.logs.level}"/>
|
|
|
<logger name="java.sql.Statement" value="${yoho.logs.level}"/>
|
|
|
<logger name="com.ibatis" value="${yoho.logs.level}"/>
|
|
|
<logger name="com.ibatis.common.jdbc.SimpleDataSource" value="${yoho.logs.level}"/>
|
|
|
<logger name="com.ibatis.common.jdbc.ScriptRunner" level="${yoho.logs.level}"/>
|
|
|
<logger name="com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate" value="${yoho.logs.level}"/>
|
|
|
<logger name="org.springframework" level="INFO"/>
|
|
|
<logger name="org.apache.zookeeper.ClientCnxn" level="WARN"/>
|
|
|
<!-- resources -->
|
|
|
<logger name="TRACE" additivity="false">
|
|
|
<level value="TRACE"/>
|
|
|
<appender-ref ref="TRACE_LOG"/>
|
|
|
</logger>
|
|
|
<!-- root级别 DEBUG -->
|
|
|
<root level="${yoho.logs.level}">
|
|
|
<!-- 文件输出 -->
|
...
|
...
|
@@ -200,32 +87,11 @@ |
|
|
<appender-ref ref="WARN_LOG"/>
|
|
|
</root>
|
|
|
|
|
|
<!-- 登录时,如果一个IP在一定时间内登录次数过多,记录日志 appender -->
|
|
|
<logger name="ipLoginMoreLog" level="INFO" additivity="false">
|
|
|
<appender-ref ref="IP_LOGIN_MORE_LOG" />
|
|
|
</logger>
|
|
|
|
|
|
<logger name="static_log" additivity="false">
|
|
|
<level value="INFO"/>
|
|
|
<appender-ref ref="STATIC_LOG"/>
|
|
|
</logger>
|
|
|
|
|
|
|
|
|
<!-- payment BD 大数据采集 -->
|
|
|
<logger name="paymentBDLogger" additivity="true">
|
|
|
<level value="info"/>
|
|
|
<appender-ref ref="PAYMENTBD_LOG"/>
|
|
|
</logger>
|
|
|
|
|
|
|
|
|
<!-- 推荐位 大数据采集 -->
|
|
|
<logger name="recommendLogger" additivity="false">
|
|
|
<level value="INFO"/>
|
|
|
<appender-ref ref="RECOMMEND_LOG"/>
|
|
|
</logger>
|
|
|
|
|
|
<logger name="blackUserLogger" additivity="true">
|
|
|
<level value="INFO"/>
|
|
|
<appender-ref ref="BLACK_USER_LOG"/>
|
|
|
</logger>
|
|
|
</configuration> |
|
|
\ No newline at end of file |
|
|
</configuration> |
|
|
\ No newline at end of file |
...
|
...
|
|