合并dev分支代码
commit
5812b5b7b5
@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<configuration status="WARN">
|
||||||
|
<!--全局参数-->
|
||||||
|
<Properties>
|
||||||
|
<Property name="log4j2.level" value="INFO"/>
|
||||||
|
<Property name="info_pattern">[%p] %d{yyyy-MM-dd HH:mm:ss-SSS} %c(%M:%L) 信息:%m%n</Property>
|
||||||
|
<Property name="system_log_pattern">[SYS-%p] %d{yyyy-MM-dd HH:mm:ss-SSS} 系统:%m ( %F -> %M:%L)%n</Property>
|
||||||
|
</Properties>
|
||||||
|
<Loggers>
|
||||||
|
<Root level="${log4j2.level}">
|
||||||
|
<AppenderRef ref="console"></AppenderRef>
|
||||||
|
</Root>
|
||||||
|
<!--系统提示信息-->
|
||||||
|
<Logger name="system_log" level="${log4j2.level}" additivity="false">
|
||||||
|
<AppenderRef ref="system_log_console"></AppenderRef>
|
||||||
|
</Logger>
|
||||||
|
</Loggers>
|
||||||
|
<Appenders>
|
||||||
|
<Console name="console" target="SYSTEM_OUT" follow="true">
|
||||||
|
<!--控制台只输出level及以上级别的信息-->
|
||||||
|
<ThresholdFilter level="INFO" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
|
<PatternLayout>
|
||||||
|
<Pattern>${info_pattern}</Pattern>
|
||||||
|
</PatternLayout>
|
||||||
|
</Console>
|
||||||
|
<Console name="system_log_console" target="SYSTEM_OUT" follow="true">
|
||||||
|
<ThresholdFilter level="INFO" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
|
<PatternLayout>
|
||||||
|
<Pattern>${system_log_pattern}</Pattern>
|
||||||
|
</PatternLayout>
|
||||||
|
</Console>
|
||||||
|
</Appenders>
|
||||||
|
</configuration>
|
@ -0,0 +1,55 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<configuration status="WARN">
|
||||||
|
<!--全局参数-->
|
||||||
|
<Properties>
|
||||||
|
<Property name="log4j2.level" value="INFO"/>
|
||||||
|
<Property name="logoInfoFilePath" value="D:/impp_logs/test-${project.name}"/>
|
||||||
|
<Property name="logoErrorFilePath" value="D:/impp_logs/test-${project.name}-error"/>
|
||||||
|
<Property name="pattern">[%p] %d{yyyy-MM-dd HH:mm:ss-SSS} %l 信息:%m%n</Property>
|
||||||
|
<Property name="info_pattern">[%p] %d{yyyy-MM-dd HH:mm:ss-SSS} %c(%M:%L) 信息:%m%n</Property>
|
||||||
|
<Property name="system_log_pattern">[SYS-%p] %d{yyyy-MM-dd HH:mm:ss-SSS} 系统:%m ( %F -> %M:%L)%n</Property>
|
||||||
|
</Properties>
|
||||||
|
<Loggers>
|
||||||
|
<Root level="${log4j2.level}">
|
||||||
|
<AppenderRef ref="console"></AppenderRef>
|
||||||
|
<AppenderRef ref="rolling_file"></AppenderRef>
|
||||||
|
<AppenderRef ref="error_file"></AppenderRef>
|
||||||
|
</Root>
|
||||||
|
<!--系统提示信息-->
|
||||||
|
<Logger name="system_log" level="${log4j2.level}" additivity="false">
|
||||||
|
<AppenderRef ref="system_log_console"></AppenderRef>
|
||||||
|
</Logger>
|
||||||
|
</Loggers>
|
||||||
|
<Appenders>
|
||||||
|
<Console name="console" target="SYSTEM_OUT" follow="true">
|
||||||
|
<!--控制台只输出level及以上级别的信息-->
|
||||||
|
<ThresholdFilter level="INFO" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
|
<PatternLayout>
|
||||||
|
<Pattern>${info_pattern}</Pattern>
|
||||||
|
</PatternLayout>
|
||||||
|
</Console>
|
||||||
|
<Console name="system_log_console" target="SYSTEM_OUT" follow="true">
|
||||||
|
<ThresholdFilter level="INFO" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
|
<PatternLayout>
|
||||||
|
<Pattern>${system_log_pattern}</Pattern>
|
||||||
|
</PatternLayout>
|
||||||
|
</Console>
|
||||||
|
<RollingFile name="rolling_file"
|
||||||
|
fileName="${logoInfoFilePath}.log"
|
||||||
|
filePattern="${logoInfoFilePath}_%d{yyyy-MM-dd}.log">
|
||||||
|
<ThresholdFilter level="DEBUG" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
|
<PatternLayout>
|
||||||
|
<Pattern>${pattern}</Pattern>
|
||||||
|
</PatternLayout>
|
||||||
|
<Policies>
|
||||||
|
<TimeBasedTriggeringPolicy interval="1"/>
|
||||||
|
</Policies>
|
||||||
|
</RollingFile>
|
||||||
|
<File name="error_file" fileName="${logoErrorFilePath}.log">
|
||||||
|
<ThresholdFilter level="WARN" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
|
<PatternLayout>
|
||||||
|
<Pattern>${pattern}</Pattern>
|
||||||
|
</PatternLayout>
|
||||||
|
</File>
|
||||||
|
</Appenders>
|
||||||
|
</configuration>
|
Loading…
Reference in New Issue