2010-11-09 15:26:05 +00:00
|
|
|
import ch.qos.logback.classic.encoder.PatternLayoutEncoder
|
|
|
|
import ch.qos.logback.core.ConsoleAppender
|
|
|
|
import ch.qos.logback.core.FileAppender
|
|
|
|
import static ch.qos.logback.classic.Level.*
|
|
|
|
|
|
|
|
appender("CONSOLE", ConsoleAppender) {
|
|
|
|
encoder(PatternLayoutEncoder) {
|
2010-11-11 19:15:16 +00:00
|
|
|
pattern = "%level - %msg%n"
|
2010-11-09 15:26:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
appender("FILE", FileAppender) {
|
|
|
|
file="gritter.log"
|
|
|
|
encoder(PatternLayoutEncoder) {
|
2010-11-11 19:15:16 +00:00
|
|
|
pattern = "%date %level %logger - %msg%n"
|
2010-11-09 15:26:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-11-11 19:15:16 +00:00
|
|
|
root(WARN, ["CONSOLE"])
|
|
|
|
logger("com.jdbernard.twitter", TRACE, ["FILE"], false)
|