erf.wind-core.4.0.6.source-code.logback-spring-sample.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <configuration> <appender name="console" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <Pattern>%d{HH:mm:ss.SSS} [%thread] %highlight(%-5level) [%cyan(%logger{36})] : %msg %n</Pattern> </encoder> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>TRACE</level> </filter> </appender> <appender name="error" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>./logs/error.log</file> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <level>ERROR</level> <onMatch>ACCEPT</onMatch> <onMismatch>DENY</onMismatch> </filter> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <!-- rollover daily --> <fileNamePattern>./logs/%d{yyyy-MM-dd}-error.%i.log</fileNamePattern> <maxHistory>30</maxHistory> <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> <!-- or whenever the file size reaches 100MB --> <maxFileSize>10MB</maxFileSize> </timeBasedFileNamingAndTriggeringPolicy> </rollingPolicy> <encoder> <pattern>%date %level [%thread] %logger{36} - %msg%n</pattern> </encoder> </appender> <appender name="common" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>./logs/common.log</file> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <level>ERROR</level> <onMatch>DENY</onMatch> <onMismatch>ACCEPT</onMismatch> </filter> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <!-- rollover daily --> <fileNamePattern>./logs/%d{yyyy-MM-dd}-common.%i.log</fileNamePattern> <maxHistory>30</maxHistory> <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> <!-- or whenever the file size reaches 100MB --> <maxFileSize>20MB</maxFileSize> </timeBasedFileNamingAndTriggeringPolicy> </rollingPolicy> <encoder> <pattern>%date %level [%thread] %logger{36} - %msg%n</pattern> </encoder> </appender> <appender name="operate" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>./logs/operate.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <!-- rollover daily --> <fileNamePattern>./logs/%d{yyyy-MM-dd}-operate.%i.log</fileNamePattern> <maxHistory>30</maxHistory> <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> <!-- or whenever the file size reaches 100MB --> <maxFileSize>20MB</maxFileSize> </timeBasedFileNamingAndTriggeringPolicy> </rollingPolicy> <encoder> <pattern>%date: %msg%n</pattern> </encoder> </appender> <appender name="jdbc.sqltiming" class="ch.qos.logback.core.rolling.RollingFileAppender"> <File>./logs/jdbc.sqltiming.log</File> <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> <FileNamePattern>./logs/jdbc.sqltiming.%i.log</FileNamePattern> <MinIndex>1</MinIndex> <MaxIndex>5</MaxIndex> </rollingPolicy> <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> <MaxFileSize>5MB</MaxFileSize> </triggeringPolicy> <layout class="ch.qos.logback.classic.PatternLayout"> <Pattern>%date %level [%thread] %logger{80} - %msg%n</Pattern> </layout> </appender> <logger name="jdbc.sqltiming" additivity="false"> <appender-ref ref="jdbc.sqltiming"/> </logger> <root> <appender-ref ref="common"/> <appender-ref ref="error"/> <appender-ref ref="console"/> </root> </configuration>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy