1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <configuration>
- <!-- <property name="LOGHOME" value="/alidata1/app/tomcat/logs" /> -->
- <property name="LOGHOME" value="/Users/nnyin/log" />
- <!-- <property name="LOGHOME" value="d:/temp/logs" /> -->
- <!-- 输出日志到文件
- <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>5MB</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>
- <!-- 不输出定时器输出的日志 -->
- <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
- <evaluator>
- <expression><![CDATA[return logger.contains(".business.quartz");]]></expression>
- </evaluator>
- <OnMatch>DENY</OnMatch>
- <OnMismatch>NEUTRAL</OnMismatch>
- </filter>
- <!-- 只允许打印错误日志NEUTRAL,DENY,ACCEPT
- <filter class="ch.qos.logback.classic.filter.LevelFilter">
- <level>ERROR</level>
- <onMatch>ACCEPT</onMatch>
- <onMismatch>DENY</onMismatch>
- </filter>
- -->
- </appender>
-
- <!-- <logger name="com.zdsoft.fortunet.model.dao" level="ERROR" additivity="false"/> -->
- <logger name="com.zdsoft.rock.common.model.dao" level="ERROR" additivity="false"/>
- <logger name="com.zdsoft" level="DEBUG"/>
- <root level="ERROR">
- <appender-ref ref="STDOUT" />
- </root>
-
- </configuration>
|