15/03/2018, 04:44
|
| | Fecha de Ingreso: septiembre-2007
Mensajes: 268
Antigüedad: 17 años, 2 meses Puntos: 8 | |
Respuesta: Hibernate: problema con logs. gracias yo creo que tengo una configuración general y no se cambiarla.
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>
%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n
</Pattern>
</layout>
</appender>
<appender name="FILE-AUDIT" class="ch.qos.logback.core.rolling.RollingFileAppe nder">
<file>${DEV_HOME}/${APP_NAME}-debug.log</file>
<encoder class="ch.qos.logback.classic.encoder.PatternLayou tEncoder">
<Pattern>
%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n
</Pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollin gPolicy">
<!-- rollover daily -->
<fileNamePattern>${DEV_HOME}/archived/${APP_NAME}-debug.%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBase dFNATP">
<maxFileSize>10MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
</appender>
<appender name="FILE-ERROR" class="ch.qos.logback.core.rolling.RollingFileAppe nder">
<file>${DEV_HOME}/${APP_NAME}-error.log</file>
<encoder class="ch.qos.logback.classic.encoder.PatternLayou tEncoder">
<Pattern>
%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n
</Pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollin gPolicy">
<!-- rollover daily -->
<fileNamePattern>${DEV_HOME}/archived/${APP_NAME}-error.%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBase dFNATP">
<maxFileSize>10MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
</appender>
<appender name="FILE-SQL" class="ch.qos.logback.core.rolling.RollingFileAppe nder">
<file>${DEV_HOME}/${APP_NAME}-sql.log</file>
<encoder class="ch.qos.logback.classic.encoder.PatternLayou tEncoder">
<Pattern>
%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n
</Pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollin gPolicy">
<FileNamePattern>${DEV_HOME}/archived/${APP_NAME}-sql.%d{yyyy-MM-dd}.%i.log
</FileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBase dFNATP">
<maxFileSize>10MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
</appender>
<logger name="org.hibernate" additivity="false" level="info" >
<appender-ref ref="FILE-SQL" />
<appender-ref ref="STDOUT" />
</logger>
<logger name="org.hibernate.SQL" additivity="false" level="debug" >
<appender-ref ref="FILE-SQL" />
<appender-ref ref="STDOUT" />
</logger>
<logger name="org.hibernate.type" additivity="false" level="trace" >
<appender-ref ref="FILE-SQL" />
<appender-ref ref="STDOUT" />
</logger>
<logger name="com.fasterxml.jackson" level="debug" >
<appender-ref ref="FILE-AUDIT" />
<appender-ref ref="STDOUT" />
</logger>
<logger name="es.dominion.ftw" level="debug" additivity="false">
<appender-ref ref="FILE-AUDIT" />
<appender-ref ref="STDOUT" />
</logger>
<root level="error">
<appender-ref ref="FILE-ERROR" />
</root> |