tags:

views:

24

answers:

3

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

+2  A: 

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.

skaffman
+1  A: 

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.

alexn
A: 

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.

Armadillo