log4j:ERROR Failed to rename [/log/xxx.log] to [/log/xxx.log.2016-11-23.log]


Log4j報錯:

log4j:ERROR Failed to rename [/log/xxx.log] to [/log/xxx.log.2016-11-23.log]

google了一下發現是個bug:

https://bz.apache.org/bugzilla/show_bug.cgi?id=29726

I checked myself, and found it was solved only in 1.3 for DRFA.
For RFA, it has been solved in 1.2.15 too (see bug 41735).

On another hand, now 1.3 has been abandoned. But its
o.a.l.rolling.RollingFileAppender, that solved the problem,
is available in companions / extras, which release 1.0 has
been recently released.

Please note that, though RFA and DRFA are deprecated in favor
or o.a.l.rolling.RFA in 1.3, they are not deprecated in 1.2.15.

解決方法:升級log4j: 1.2.14到1.2.15。

發現另一個項目使用的是1.2.17 ,沒有這個問題,應該從 1.2.15之后都fix了這個bug。 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM