I’m not sure how it’s taken me this long to notice, but every time I bounce my JBoss server it deletes my log file. WTF? Who would think that is a good, default behavior for handling log files? I mean really??? It’s a little hard to debug a problem when your friggin’ log file gets deleted every time you bounce your server. JEEZ!
Obviously, the first guy that tells me how to change this behaviour will be my “Hero of the day”. Before somebody asks, I’m on a linux box (one Ubuntu, one Red Hat) both are running JBoss 3.2.5.
So after doing a bit of Googling I found the answer to my problem. The question was, “why is my server.log file being deleted every time I bounce my JBoss server?”. The answer is in my server/default/conf/log4j.xml file. The fix was a simple false to true switch.
log4j.xml entry that deletes the server.log every start:
param name=”Append” value=”false”
log4j.xml entry that appends to the server.log every start:
param name=”Append” value=”true”
These changes were made in my appender element.