1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <configuration>
-
- <property name="LOGHOME" value="/Users/nnyin/log" />
-
-
- <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <Encoding>UTF-8</Encoding>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <FileNamePattern>${LOGHOME}/app.%d{yyyy-MM-dd}.log</FileNamePattern>
- </rollingPolicy>
- <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>500MB</maxFileSize>
- </triggeringPolicy>
- <encoder>
- <Pattern>[%date{yyyy-MM-dd HH:mm:ss}][%-5level][%file:%line] %msg%n</Pattern>
- </encoder>
- <filter class="ch.qos.logback.classic.filter.LevelFilter">
- <level>ERROR</level>
- <onMatch>ACCEPT</onMatch>
- <onMismatch>DENY</onMismatch>
- </filter>
- </appender>
-
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <Encoding>UTF-8</Encoding>
- <encoder>
- <pattern>%d{HH:mm:ss}[%-5level][%file:%line] %msg%n</pattern>
- </encoder>
-
-
- </appender>
-
- <root level="DEBUG">
- <appender-ref ref="STDOUT" />
- <appender-ref ref="FILE" />
- </root>
-
- </configuration>
|