|
|
|
@ -6,6 +6,7 @@
|
|
|
|
|
<Property name="logoSystemFilePath" value="../logs/${project.name}-system"/>
|
|
|
|
|
<Property name="logoInfoFilePath" value="../logs/${project.name}-info"/>
|
|
|
|
|
<Property name="logoErrorFilePath" value="../logs/${project.name}-error"/>
|
|
|
|
|
<Property name="logoConsoleFilePath" value="../logs/${project.name}-console"/>
|
|
|
|
|
<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>
|
|
|
|
@ -15,6 +16,7 @@
|
|
|
|
|
<AppenderRef ref="console"></AppenderRef>
|
|
|
|
|
<AppenderRef ref="rolling_file"></AppenderRef>
|
|
|
|
|
<AppenderRef ref="error_file"></AppenderRef>
|
|
|
|
|
<AppenderRef ref="console_file"></AppenderRef>
|
|
|
|
|
</Root>
|
|
|
|
|
<!--系统提示信息-->
|
|
|
|
|
<Logger name="system_log" level="${log4j2.level}" additivity="false">
|
|
|
|
@ -29,17 +31,23 @@
|
|
|
|
|
<Pattern>${info_pattern}</Pattern>
|
|
|
|
|
</PatternLayout>
|
|
|
|
|
</Console>
|
|
|
|
|
<File name="system_log_console" target="SYSTEM_OUT" follow="true"
|
|
|
|
|
fileName="${logoSystemFilePath}.log"
|
|
|
|
|
filePattern="${logoSystemFilePath}_%d{yyyy-MM-dd}.log">
|
|
|
|
|
|
|
|
|
|
<File name="console_file"
|
|
|
|
|
fileName="${logoConsoleFilePath}.log" >
|
|
|
|
|
<ThresholdFilter level="INFO" onMatch="ACCEPT" onMismatch="DENY"/>
|
|
|
|
|
<PatternLayout>
|
|
|
|
|
<Pattern>${info_pattern}</Pattern>
|
|
|
|
|
</PatternLayout>
|
|
|
|
|
</File>
|
|
|
|
|
|
|
|
|
|
<File name="system_log_console" fileName="${logoSystemFilePath}.log">
|
|
|
|
|
<ThresholdFilter level="INFO" onMatch="ACCEPT" onMismatch="DENY"/>
|
|
|
|
|
<PatternLayout>
|
|
|
|
|
<Pattern>${system_log_pattern}</Pattern>
|
|
|
|
|
</PatternLayout>
|
|
|
|
|
</File>
|
|
|
|
|
<RollingFile name="rolling_file"
|
|
|
|
|
fileName="${logoInfoFilePath}.log"
|
|
|
|
|
filePattern="${logoInfoFilePath}_%d{yyyy-MM-dd}.log">
|
|
|
|
|
|
|
|
|
|
<RollingFile name="rolling_file" fileName="${logoInfoFilePath}.log">
|
|
|
|
|
<ThresholdFilter level="DEBUG" onMatch="ACCEPT" onMismatch="DENY"/>
|
|
|
|
|
<PatternLayout>
|
|
|
|
|
<Pattern>${pattern}</Pattern>
|
|
|
|
@ -48,6 +56,7 @@
|
|
|
|
|
<TimeBasedTriggeringPolicy interval="1"/>
|
|
|
|
|
</Policies>
|
|
|
|
|
</RollingFile>
|
|
|
|
|
|
|
|
|
|
<File name="error_file" fileName="${logoErrorFilePath}.log">
|
|
|
|
|
<ThresholdFilter level="WARN" onMatch="ACCEPT" onMismatch="DENY"/>
|
|
|
|
|
<PatternLayout>
|
|
|
|
|