log4j move rolling files to another directory/location
问题 my goal is whenever file mylog.log is rolled to mylog.log.1 this rolled file is also moved to another directory, so in the original directory there is always only mylog.log . Is this possible using RollingFileAppender ? Or another appender from default log4j library? 回答1: I think you mean the RollingFileAppender from Log4J if you use version >= 1.2.16 and the log4j-extras you can use this log4j.rootCategory=INFO, base log4j.appender.base=org.apache.log4j.rolling.RollingFileAppender log4j