Created
January 12, 2017 22:05
-
-
Save jebberjeb/24981a41fccd04652ca0c1a1c4c4ddaa to your computer and use it in GitHub Desktop.
Logback appender used with Stuart Sierra's log.dev
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<appender name="ALL_LOG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
<!-- Default encoder is ch.qos.logback.classic.encoder.PatternLayoutEncoder --> | |
<encoder> | |
<pattern>%date{HH:mm:ss.SSS} %-5level %logger{25}: %msg %X thread=%thread%n</pattern> | |
</encoder> | |
<!-- Default location of log file is log/all.log --> | |
<file>log/all.log</file> | |
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> | |
<!-- Can't contain date stuff or won't roll over --> | |
<fileNamePattern>log/all.%i.log</fileNamePattern> | |
<!-- Only retain 5 * 64MB of log files --> | |
<minIndex>1</minIndex> | |
<maxIndex>5</maxIndex> | |
</rollingPolicy> | |
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> | |
<maxFileSize>64MB</maxFileSize> | |
</triggeringPolicy> | |
</appender> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Used this after copy/paste'ing https://github.com/stuartsierra/log.dev logback.xml into a project for use in local dev env.