2016-07-21 12:55:40 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<Configuration status="info">
|
|
|
|
|
|
|
|
<Properties>
|
2018-06-07 10:26:19 +00:00
|
|
|
<Property name="log-path">${sys:log-path:-logs}</Property>
|
2016-07-25 17:07:50 +00:00
|
|
|
<Property name="log-name">node-${hostName}</Property>
|
2018-06-07 10:26:19 +00:00
|
|
|
<Property name="archive">${log-path}/archive</Property>
|
|
|
|
<Property name="consoleLogLevel">${sys:consoleLogLevel:-error}</Property>
|
|
|
|
<Property name="defaultLogLevel">${sys:defaultLogLevel:-info}</Property>
|
2016-07-21 12:55:40 +00:00
|
|
|
</Properties>
|
|
|
|
|
|
|
|
<ThresholdFilter level="trace"/>
|
|
|
|
|
|
|
|
<Appenders>
|
|
|
|
<Console name="Console-Appender" target="SYSTEM_OUT">
|
2018-06-07 10:26:19 +00:00
|
|
|
<PatternLayout>
|
|
|
|
<ScriptPatternSelector defaultPattern="%highlight{[%level{length=5}] %date{HH:mm:ssZ} [%t] %c{2}.%method - %msg%n}{INFO=white,WARN=red,FATAL=bright red}">
|
|
|
|
<Script name="MDCSelector" language="javascript"><![CDATA[
|
|
|
|
result = null;
|
|
|
|
if (!logEvent.getContextData().size() == 0) {
|
|
|
|
result = "WithMDC";
|
|
|
|
} else {
|
|
|
|
result = null;
|
|
|
|
}
|
|
|
|
result;
|
|
|
|
]]>
|
|
|
|
</Script>
|
|
|
|
<PatternMatch key="WithMDC" pattern="%highlight{[%level{length=5}] %date{HH:mm:ssZ} [%t] %c{2}.%method - %msg %X%n}{INFO=white,WARN=red,FATAL=bright red}"/>
|
|
|
|
</ScriptPatternSelector>
|
|
|
|
</PatternLayout>
|
|
|
|
<ThresholdFilter level="trace"/>
|
2016-07-21 12:55:40 +00:00
|
|
|
</Console>
|
|
|
|
|
2017-03-15 16:18:24 +00:00
|
|
|
<!-- Required for printBasicInfo -->
|
|
|
|
<Console name="Console-Appender-Println" target="SYSTEM_OUT">
|
|
|
|
<PatternLayout pattern="%msg%n" />
|
|
|
|
</Console>
|
|
|
|
|
2018-06-07 10:26:19 +00:00
|
|
|
<!-- Will generate up to 100 log files for a given day. During every rollover it will delete
|
2016-07-21 12:55:40 +00:00
|
|
|
those that are older than 60 days, but keep the most recent 10 GB -->
|
|
|
|
<RollingFile name="RollingFile-Appender"
|
2018-06-07 10:26:19 +00:00
|
|
|
fileName="${log-path}/${log-name}.log"
|
2017-06-26 12:24:24 +00:00
|
|
|
filePattern="${archive}/${log-name}.%date{yyyy-MM-dd}-%i.log.gz">
|
2016-07-21 12:55:40 +00:00
|
|
|
|
2017-11-15 14:58:43 +00:00
|
|
|
<PatternLayout pattern="[%-5level] %date{ISO8601}{UTC}Z [%t] %c{2}.%method - %msg %X%n"/>
|
2016-07-21 12:55:40 +00:00
|
|
|
|
|
|
|
<Policies>
|
|
|
|
<TimeBasedTriggeringPolicy/>
|
|
|
|
<SizeBasedTriggeringPolicy size="10MB"/>
|
|
|
|
</Policies>
|
|
|
|
|
2018-06-07 10:26:19 +00:00
|
|
|
<DefaultRolloverStrategy min="1" max="100">
|
2016-07-21 12:55:40 +00:00
|
|
|
<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>
|
2018-06-07 10:26:19 +00:00
|
|
|
<Root level="${defaultLogLevel}">
|
|
|
|
<AppenderRef ref="Console-Appender" level="${consoleLogLevel}"/>
|
2017-02-13 14:43:27 +00:00
|
|
|
<AppenderRef ref="RollingFile-Appender" />
|
2016-07-21 12:55:40 +00:00
|
|
|
</Root>
|
2017-03-15 16:18:24 +00:00
|
|
|
<Logger name="BasicInfo" additivity="false">
|
|
|
|
<AppenderRef ref="Console-Appender-Println"/>
|
|
|
|
<AppenderRef ref="RollingFile-Appender" />
|
|
|
|
</Logger>
|
2018-06-07 10:26:19 +00:00
|
|
|
<Logger name="org.hibernate.SQL" level="info" additivity="false">
|
|
|
|
<AppenderRef ref="Console-Appender"/>
|
|
|
|
<AppenderRef ref="RollingFile-Appender"/>
|
|
|
|
</Logger>
|
2017-03-29 10:40:19 +00:00
|
|
|
<Logger name="org.apache.activemq.artemis.core.server" level="error" additivity="false">
|
2018-06-07 10:26:19 +00:00
|
|
|
<AppenderRef ref="Console-Appender"/>
|
2017-03-30 10:04:51 +00:00
|
|
|
<AppenderRef ref="RollingFile-Appender"/>
|
2017-03-29 10:40:19 +00:00
|
|
|
</Logger>
|
2018-03-07 13:12:15 +00:00
|
|
|
<Logger name="org.jolokia" additivity="true" level="warn">
|
|
|
|
<AppenderRef ref="Console-Appender-Println"/>
|
|
|
|
<AppenderRef ref="RollingFile-Appender" />
|
|
|
|
</Logger>
|
2016-07-21 12:55:40 +00:00
|
|
|
</Loggers>
|
2017-03-30 10:04:51 +00:00
|
|
|
</Configuration>
|