<?xml version="1.0" encoding="UTF-8"?>
<!--https://logging.apache.org/log4j/2.x/manual/configuration.html-->
<Configuration status="TRACE" monitorInterval="30">
<!-- Definición de propiedades | property definition -->
<Properties>
<Property name="LOG_PATTERN">%d{yyyy-MM-dd'T'HH:mm:ss.SSSZ} [%t] %-5level %logger{36} - %msg%n</Property>
<Property name="APP_LOG_ROOT">var/log/tomcat0</Property>
</Properties>
<Appenders>
<!-- Console Appender | Escritura de los en la consola-->
<Console name="Console" target="SYSTEM_OUT" follow="true">
<PatternLayout pattern="${LOG_PATTERN}" />
</Console>
<!-- File Appenders on need basis -->
<RollingFile name="frameworkLog"
fileName="${APP_LOG_ROOT}/logs/app-framework.log"
filePattern="${APP_LOG_ROOT}/logs/$${date:yyyy-MM}/app-framework-%d{yyyy-MM-dd}-%i.log.gz">
<LevelRangeFilter minLevel="ERROR" maxLevel="ERROR" onMatch="ACCEPT"
onMismatch="DENY"/>
<PatternLayout pattern="${LOG_PATTERN}"/>
<Policies>
<TimeBasedTriggeringPolicy />
<SizeBasedTriggeringPolicy size="19500KB" />
</Policies>
<DefaultRolloverStrategy max="10"/>
</RollingFile>
<RollingFile name="debugLog"
fileName="${APP_LOG_ROOT}/logs/automatizador-debug.log"
filePattern="${APP_LOG_ROOT}/logs/$${date:yyyy-MM}/automatizador-debug-%d{yyyy-MM-dd}-%i.log.gz">
<LevelRangeFilter minLevel="DEBUG" maxLevel="DEBUG" onMatch="ACCEPT"
onMismatch="DENY"/>
<PatternLayout pattern="${LOG_PATTERN}"/>
<Policies>
<TimeBasedTriggeringPolicy />
<SizeBasedTriggeringPolicy size="19500KB" />
</Policies>
<DefaultRolloverStrategy max="10"/>
</RollingFile>
<RollingFile name="infoLog"
fileName="${APP_LOG_ROOT}/logs/automatizador-info.log"
filePattern="${APP_LOG_ROOT}/logs/$${date:yyyy-MM}/automatizador-info-%d{yyyy-MM-dd}-%i.log.gz" >
<LevelRangeFilter minLevel="INFO" maxLevel="INFO" onMatch="ACCEPT"
onMismatch="DENY"/>
<PatternLayout pattern="${LOG_PATTERN}"/>
<Policies>
<TimeBasedTriggeringPolicy />
<SizeBasedTriggeringPolicy size="19500KB" />
</Policies>
<DefaultRolloverStrategy max="10"/>
</RollingFile>
<RollingFile name="errorLog"
fileName="${APP_LOG_ROOT}/logs/automatizador-error.log"
filePattern="${APP_LOG_ROOT}/logs/$${date:yyyy-MM}/automatizador-error-%d{yyyy-MM-dd}-%i.log.gz" >
<LevelRangeFilter minLevel="ERROR" maxLevel="ERROR" onMatch="ACCEPT"
onMismatch="DENY"/>
<PatternLayout pattern="${LOG_PATTERN}"/>
<Policies>
<TimeBasedTriggeringPolicy />
<SizeBasedTriggeringPolicy size="19500KB" />
</Policies>
<DefaultRolloverStrategy max="10"/>
</RollingFile>
<RollingRandomAccessFile name="traceLogAsyncFile"
fileName="${APP_LOG_ROOT}/logs/automatizador-trace.log"
filePattern="${APP_LOG_ROOT}/logs/$${date:yyyy-MM}/automatizador-trace-%d{yyyy-MM-dd}-%i.log.gz" >
<PatternLayout pattern="${LOG_PATTERN}"/>
<Policies>
<TimeBasedTriggeringPolicy />
<SizeBasedTriggeringPolicy size="19500KB" />
</Policies>
<DefaultRolloverStrategy max="10"/>
</RollingRandomAccessFile>
<Async name="traceLogAsync">
<AppenderRef ref="traceLogAsyncFile"/>
</Async>
</Appenders>
<Loggers>
<Logger name="com.advanced.development" additivity="false"
level="trace">
<AppenderRef ref="traceLogAsync" />
<AppenderRef ref="debugLog" />
<AppenderRef ref="infoLog" />
<AppenderRef ref="errorLog" />
<AppenderRef ref="Console" />
</Logger>
<Logger name="org.springframework" additivity="false" level="error">
<AppenderRef ref="frameworkLog" />
<AppenderRef ref="Console"/>
</Logger>
<Root level="error">
<AppenderRef ref="errorLog"/>
<AppenderRef ref="Console"/>
</Root>
</Loggers>
</Configuration>
Comentarios
Publicar un comentario