forked from RRZE-PP/crawler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
log4jconfig.groovy
28 lines (22 loc) · 950 Bytes
/
log4jconfig.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/**
*
* @see <a href="https://gist.github.com/neversleepz/7381062#file-loggingfromconsolescript-groovy">neversleepz Gist</a>
* @see <a href="https://stackoverflow.com/questions/19868180/groovy-script-and-log4j">stackoverflow</a>
*
*/
log4j {
appender.stdout = "org.apache.log4j.ConsoleAppender"
appender."stdout.layout"="org.apache.log4j.PatternLayout"
appender."stdout.layout.ConversionPattern"="%d %5p %c{1}:%L - %m%n"
appender.scrlog = "org.apache.log4j.DailyRollingFileAppender"
appender."scrlog.DatePattern"="'.'yyyy-MM-dd"
appender."scrlog.Append"="true"
// appender.scrlog = "org.apache.log4j.FileAppender"
appender."scrlog.layout"="org.apache.log4j.PatternLayout"
appender."scrlog.layout.ConversionPattern"="%d %5p %c{1}:%L - %m%n"
appender."scrlog.file"="crawler.log"
/**
* @see org.apache.log4j.Level
*/
rootLogger="info,scrlog,stdout"
}