2016-07-21 12:55:40 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<Configuration status="info">
|
|
|
|
|
|
|
|
<Properties>
|
|
|
|
<Property name="log-path">logs</Property>
|
2016-07-25 17:07:50 +00:00
|
|
|
<Property name="log-name">node-${hostName}</Property>
|
2016-07-21 12:55:40 +00:00
|
|
|
<Property name="archive">${log-path}/archive</Property>
|
|
|
|
</Properties>
|
|
|
|
|
|
|
|
<ThresholdFilter level="trace"/>
|
|
|
|
|
|
|
|
<Appenders>
|
|
|
|
<Console name="Console-Appender" target="SYSTEM_OUT">
|
|
|
|
<PatternLayout>
|
|
|
|
<pattern>
|
|
|
|
[%-5level] %d{HH:mm:ss.SSS} [%t] %c{1}.%M - %msg%n
|
|
|
|
</pattern>>
|
|
|
|
</PatternLayout>
|
|
|
|
</Console>
|
|
|
|
|
|
|
|
<!-- Will generate up to 10 log files for a given day. During every rollover it will delete
|
|
|
|
those that are older than 60 days, but keep the most recent 10 GB -->
|
|
|
|
<RollingFile name="RollingFile-Appender"
|
|
|
|
fileName="${log-path}/${log-name}.log"
|
|
|
|
filePattern="${archive}/${log-name}.%d{yyyy-MM-dd}-%i.log.gz">
|
|
|
|
|
2016-07-25 17:07:50 +00:00
|
|
|
<PatternLayout pattern="[%-5level] %d{ISO8601}{GMT+0} [%t] %c{1} - %msg%n"/>
|
2016-07-21 12:55:40 +00:00
|
|
|
|
|
|
|
<Policies>
|
|
|
|
<TimeBasedTriggeringPolicy/>
|
|
|
|
<SizeBasedTriggeringPolicy size="10MB"/>
|
|
|
|
</Policies>
|
|
|
|
|
|
|
|
<DefaultRolloverStrategy min="1" max="10">
|
|
|
|
<Delete basePath="${archive}" maxDepth="1">
|
|
|
|
<IfFileName glob="${log-name}*.log.gz"/>
|
|
|
|
<IfLastModified age="60d">
|
|
|
|
<IfAny>
|
|
|
|
<IfAccumulatedFileSize exceeds="10 GB"/>
|
|
|
|
</IfAny>
|
|
|
|
</IfLastModified>
|
|
|
|
</Delete>
|
|
|
|
</DefaultRolloverStrategy>
|
|
|
|
|
|
|
|
</RollingFile>
|
|
|
|
</Appenders>
|
|
|
|
|
|
|
|
<Loggers>
|
|
|
|
<Root level="trace">
|
|
|
|
<AppenderRef ref="Console-Appender" level="info"/>
|
|
|
|
<AppenderRef ref="RollingFile-Appender" level="debug"/>
|
|
|
|
</Root>
|
|
|
|
</Loggers>
|
|
|
|
|
|
|
|
</Configuration>
|