程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> JAVA編程 >> JAVA綜合教程 >> log4j:ERROR Failed to rename [/log/xxx.log] to [/log/xxx.log.2016-11-23.log],log4jxxx.log

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

編輯:JAVA綜合教程

log4j:ERROR Failed to rename [/log/xxx.log] to [/log/xxx.log.2016-11-23.log],log4jxxx.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。 

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved