|
@ -15,10 +15,7 @@ https://juejin.cn/post/6844903775631572999 |
|
|
value="%black(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss.SSS}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}) - %cyan(%msg%n)"/> |
|
|
value="%black(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss.SSS}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}) - %cyan(%msg%n)"/> |
|
|
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/> |
|
|
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/> |
|
|
<property name="LOG_HOME" value="${logPath}"/> |
|
|
<property name="LOG_HOME" value="${logPath}"/> |
|
|
<!--引入默认的一些设置--> |
|
|
|
|
|
<!--<include resource="log/XrToMes.xml"/> |
|
|
|
|
|
<include resource="log/MesToErp.xml"/>--> |
|
|
|
|
|
<!-- <include resource="log/XgAgvDeviceDriver.xml"/>--> |
|
|
|
|
|
|
|
|
|
|
|
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> |
|
|
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> |
|
|
<!--withJansi 参数改为true--> |
|
|
<!--withJansi 参数改为true--> |
|
@ -29,7 +26,7 @@ https://juejin.cn/post/6844903775631572999 |
|
|
</encoder> |
|
|
</encoder> |
|
|
</appender> |
|
|
</appender> |
|
|
|
|
|
|
|
|
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径--> |
|
|
|
|
|
<property name="LOG_HOME" value="${logPath}"/> |
|
|
<property name="LOG_HOME" value="${logPath}"/> |
|
|
<!-- 按照每天生成日志文件 --> |
|
|
<!-- 按照每天生成日志文件 --> |
|
|
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|
|
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|
@ -69,7 +66,7 @@ https://juejin.cn/post/6844903775631572999 |
|
|
<appender-ref ref="FILE"/> |
|
|
<appender-ref ref="FILE"/> |
|
|
</appender> |
|
|
</appender> |
|
|
<springProfile name="devLocal"> |
|
|
<springProfile name="devLocal"> |
|
|
<root level="DEBUG"> |
|
|
<root level="INFO"> |
|
|
<!-- <appender-ref ref="asyncLuceneAppender"/>--> |
|
|
<!-- <appender-ref ref="asyncLuceneAppender"/>--> |
|
|
<appender-ref ref="asyncFileAppender"/> |
|
|
<appender-ref ref="asyncFileAppender"/> |
|
|
<appender-ref ref="CONSOLE"/> |
|
|
<appender-ref ref="CONSOLE"/> |
|
@ -247,29 +244,16 @@ https://juejin.cn/post/6844903775631572999 |
|
|
|
|
|
|
|
|
<!--生产环境:打印控制台和输出到文件--> |
|
|
<!--生产环境:打印控制台和输出到文件--> |
|
|
<springProfile name="prod"> |
|
|
<springProfile name="prod"> |
|
|
<root level="DEBUG"> |
|
|
<root level="info"> |
|
|
<appender-ref ref="asyncFileAppender"/> |
|
|
<appender-ref ref="asyncFileAppender"/> |
|
|
<!-- <appender-ref ref="asyncLuceneAppender"/>--> |
|
|
|
|
|
</root> |
|
|
</root> |
|
|
<logger name="org.springframework" level="ERROR" additivity="true"> |
|
|
|
|
|
<appender-ref ref="asyncFileAppender"/> |
|
|
|
|
|
</logger> |
|
|
|
|
|
<logger name="org.apache" level="ERROR" additivity="true"> |
|
|
|
|
|
<appender-ref ref="asyncFileAppender"/> |
|
|
|
|
|
</logger> |
|
|
|
|
|
<logger name="org.hibernate" level="ERROR" additivity="true"> |
|
|
|
|
|
<appender-ref ref="asyncFileAppender"/> |
|
|
|
|
|
</logger> |
|
|
|
|
|
<logger name="io.netty" level="ERROR" additivity="true"> |
|
|
|
|
|
<appender-ref ref="asyncFileAppender"/> |
|
|
|
|
|
</logger> |
|
|
|
|
|
<logger name="jdbc" level="ERROR" additivity="true"> |
|
|
<logger name="jdbc" level="ERROR" additivity="true"> |
|
|
<appender-ref ref="asyncFileAppender"/> |
|
|
<appender-ref ref="asyncFileAppender"/> |
|
|
</logger> |
|
|
</logger> |
|
|
<logger name="io.lettuce" level="ERROR" additivity="true"> |
|
|
<logger name="org.springframework" level="ERROR" additivity="true"> |
|
|
<appender-ref ref="asyncFileAppender"/> |
|
|
<appender-ref ref="asyncFileAppender"/> |
|
|
</logger> |
|
|
</logger> |
|
|
<logger name="com.fasterxml" level="ERROR" additivity="true"> |
|
|
<logger name="org.hibernate" level="ERROR" additivity="true"> |
|
|
<appender-ref ref="asyncFileAppender"/> |
|
|
<appender-ref ref="asyncFileAppender"/> |
|
|
</logger> |
|
|
</logger> |
|
|
<logger name="org.quartz" level="ERROR" additivity="true"> |
|
|
<logger name="org.quartz" level="ERROR" additivity="true"> |
|
@ -278,13 +262,13 @@ https://juejin.cn/post/6844903775631572999 |
|
|
<logger name="com.google" level="ERROR" additivity="true"> |
|
|
<logger name="com.google" level="ERROR" additivity="true"> |
|
|
<appender-ref ref="asyncFileAppender"/> |
|
|
<appender-ref ref="asyncFileAppender"/> |
|
|
</logger> |
|
|
</logger> |
|
|
<logger name="springfox" level="ERROR" additivity="true"> |
|
|
<logger name="org.redisson" level="ERROR" additivity="true"> |
|
|
<appender-ref ref="asyncFileAppender"/> |
|
|
<appender-ref ref="asyncFileAppender"/> |
|
|
</logger> |
|
|
</logger> |
|
|
<logger name="log4jdbc" level="ERROR" additivity="true"> |
|
|
<logger name="org.nl.modules.wql" level="ERROR" additivity="true"> |
|
|
<appender-ref ref="asyncFileAppender"/> |
|
|
<appender-ref ref="asyncFileAppender"/> |
|
|
</logger> |
|
|
</logger> |
|
|
<logger name="nl.basjes" level="ERROR" additivity="true"> |
|
|
<logger name="org.springframework.data" level="ERROR" additivity="true"> |
|
|
<appender-ref ref="asyncFileAppender"/> |
|
|
<appender-ref ref="asyncFileAppender"/> |
|
|
</logger> |
|
|
</logger> |
|
|
</springProfile> |
|
|
</springProfile> |
|
|