Created
July 1, 2012 00:23
-
-
Save mike-neck/3026167 to your computer and use it in GitHub Desktop.
SimpleなLogbackの設定 - logback.groovy
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
/** | |
* | |
* @author : mike | |
* @since : 12/06/30 | |
*/ | |
import ch.qos.logback.classic.encoder.PatternLayoutEncoder as PATTERN | |
import ch.qos.logback.core.FileAppender as FILE | |
import ch.qos.logback.core.ConsoleAppender as CONSOLE | |
import static ch.qos.logback.classic.Level.DEBUG | |
appender ('FILE', FILE) { | |
file = 'log/maybe.log' | |
encoder (PATTERN) { | |
pattern = '%date{MM/dd HH:mm:ss SSS} %level [%thread] %logger{10} - %msg%n' | |
} | |
} | |
appender ('STDOUT', CONSOLE) { | |
encoder (PATTERN) { | |
pattern = '%date{HH:mm:ss SSS} %level [%thread] - %msg%n' | |
} | |
} | |
logger 'org.mikeneck.j7.persistence', ['FILE', 'STDOUT'] | |
root DEBUG, ['STDOUT'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment