tags:

views:

29

answers:

1

Which log4j appender should I use and how do I configure it? I'm not too bothered about keeping old logs, so I don't care about truncating the existing one.

+1  A: 

Assuming you're logging to file, all log4j file appenders have an append property which you can set to false to always start fresh, or true to append to previous logs. eg:

appenders {
    rollingFile name: 'file', file: 'mySite.log', append: false
}
Dave