Log4j - Have multiple appenders write to the same file with one that always logs

后端 未结 4 1240
伪装坚强ぢ
伪装坚强ぢ 2020-12-09 21:43

I have a log4j appender defined like:

log4j.logger.com.example = DEBUG, filelog

log4j.appender.filelog=org.apache.log4j.DailyRollingFileAppender
log4j.appen         


        
4条回答
  •  再見小時候
    2020-12-09 22:25

    Yes. You can "workaround" to have 2 appenders writing to the same file.

    Checkout this code + example:

    Any questions welcome.

提交回复
热议问题