framework.aa-stategen-logback.stg.2.1.0.RELEASE.source-code.logback-test.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <configuration scan="true" scanPeriod="60 seconds" debug="true"> <!-- 在classes下的logback.xm.是防止app启动时过多地输出第三方组件的日志--> <!-- appContent一旦启动后,logback将启用外部配置 1.windows上,读取tomcat所有盘如G: 即 G:/data/config/api-logback.xml的配置 2.linux或mac上,读取:/data/config/api-logback.xml的配置 --> <!-- ==================================== appenders==================================== --> <appender name="stdout" class="ch.qos.logback.core.ConsoleAppender" level="INFO"> <encoder charset="UTF-8"> <!-- encoder 可以指定字符集,对于中文输出有意义 --> <pattern><![CDATA[%d{HH:mm:ss.SSS} [%thread] %-5level %logger%n%msg%n%caller{10}]]></pattern> </encoder> </appender> <!-- ==================================== loggers==================================== --> <!-- 输出到控制台和文件,可定义更多的 Appender --> <root level="INFO"> <appender-ref ref="stdout" /> </root> <!-- 下面配置一些第三方包的日志过滤级别,用于避免刷屏 --> <logger name="stdout" level="INFO"> <appender-ref ref="stdout" /> </logger> <logger name="org.hibernate" level="WARN"/> <logger name="org.springframework" level="WARN"/> <logger name="com.opensymphony" level="WARN"/> <logger name="org.apache" level="WARN"/> <logger name="org.hibernate" level="WARN"/> <logger name="net.sf.ehcache" level="WARN"/> <logger name="org.quartz" level="WARN"/> <logger name="com.ibatis" level="DEBUG" /> <logger name="java.sql" level="DEBUG" /> </configuration>