UPDATE: JBoss Hmm…

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.

UPDATE:
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.

This Post Has 2 Comments

  1. Andy

    I do not recall that behavior in 3.2.x, but the more recent JBAS log4j.xml does not seem to exhibit this behavor (you get timestamp rollovers by default). Generally asking someone to “change this behavior” involves running a version taht is not 2 years old and verifying that it is indeed still present. Other things that happened in 2004: http://en.wikipedia.org/wiki/2004. Other things that happened in 2005 http://en.wikipedia.org/wiki/2005. Other things that happened in 2006 http://en.wikipedia.org/wiki/2006.

  2. Erik Weibust

    Wow, Andy! What a helpful comment.

Leave a Reply