For reasons that I wonโt fall into, I have to programmatically configure the log4j application.
I want to use RollingFileAppender so that I can control the maximum number of files that are stored.
I also want this appender to use TimeBaseRollingPolicy, as it will automatically take care of compressing collapsed files.
The problem is that I see no way to install this code. When configuring RollingFileAppender, usually through a properties file, you should:
log4j.appender.LOGFILE.RollingPolicy=org.apache.log4j.rolling.TimeBasedRollingPolicy
There must be a way to fix this ...? Could someone shed some light by digging through javadoc, and the main eclipse-reflection of class methods did not reveal a solution :(
source
share