开发者

making server.log append=true

How do I make the log server\\log\serve.log to be appended. i.e. whenver I restart JBoss i开发者_Go百科t should not override the content of the log but continue from the end of it?


Add <param name="Append" value="true"/> to the <Appender> in your conf/jboss-log4j.xml file. There may be multiple appenders defined, so make sure you get the one that handles server.log.


Try setting <param name="Append" value="true"/> in your log4j.xml. This may be on a FileAppender och RollingFileAppender section. Just look for the appender that writes to server.log.


Short answer: change the log file name (e.g. myapp.log)

Longer answer: We've also seen a case where the server.log got truncated in jboss. Somewhere, someone is truncating the server.log file in some static initialization block we couldn't find. Changing the file name seems to work and the contents was appended to.


we had the same issue on our remote Ubuntu 16.04 Linuxes running Jboss EAP 6.4.0 but not when we ran our Jboss server locally in Eclipse/Windows. The append property was already set to true.

I finally made it work by declaring the property append before the filename in the standalone-full.xml.

 <properties>
   <property name="append" value="true"/>
   <property name="fileName" value="${jboss.server.log.dir}/server.log"/>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜