persist previous server.log after server restarts using log4j.xml
Amit Scybs
Greenhorn
Joined: Aug 03, 2009
Posts: 2
posted
0
I am using JBOSS 4.3 and need to store the server.log after server get restarted. It does create a backup file daily but we dont need to override the existing server.log in a day if server gets restarted.changing append to true doesnt look like an option for me.
Changing the Append=true should give you what you are looking for. Are you sure, you are changing this at the correct place? Remember that the jboss log4j.xml file has a commented out FILE appender too. So make sure you are changing this property in the uncommented FILE appender
I am changing it at the right place and can see the change getting reflected.
But because of some limitation I cant use the append property. I am wondering, this is what something so strange I am asking. This makes complete sense to be just rename (using standard backup filename format) the existing log file and create a new log file.
This makes complete sense to be just rename (using standard backup filename format) the existing log file and create a new log file.
That functionality isn't available in log4j. The only way, i know, of persisting the logs on restarts is to use the append property.
Since we are discussing about log4j and its feature, i am going to move this to our "Other open source projects" forum where ranchers with more experience on log4j might be able to help.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: persist previous server.log after server restarts using log4j.xml