I am using log4j on JBoss 4.0.2. I am currently using the daily rolling file appender so that I get a archive copy of each days's log files and have a auditable history.
The problem I am experiencing is what to do when the server has to be restarted. Our server experienced a problem @ 4:00 AM this morning, and the operations staff issued a restart to JBoss. Once JBoss came back up it reinitialized log4j, and started overwriting the current log file, wiping out all the log entries that were created from midnight to 4:00. (I have the file roll over at midnight, which is probably what most people do).
Later this morning we had some more severe DB problems, and I feel our 4:00 crash might have been related, but can't verify becuase I have no log.
Is their anyway to tell Log4j, that it should archive the current log file every time it initializes? This way if myApp.log has content in it at 4:00 when the restart gets called, I don't lose that content? It's okay if it has to create it into a separate file, or change the name to something like myApp.log.A etc......
Any ideas.
Yeah.....I'm going to need you to go ahead and come in on Saturday.....Yeah.....That'd be great.
The problem I am experiencing is what to do when the server has to be restarted. Our server experienced a problem @ 4:00 AM this morning, and the operations staff issued a restart to JBoss. Once JBoss came back up it reinitialized log4j, and started overwriting the current log file, wiping out all the log entries that were created from midnight to 4:00. (I have the file roll over at midnight, which is probably what most people do).
Later this morning we had some more severe DB problems, and I feel our 4:00 crash might have been related, but can't verify becuase I have no log.
Is their anyway to tell Log4j, that it should archive the current log file every time it initializes? This way if myApp.log has content in it at 4:00 when the restart gets called, I don't lose that content? It's okay if it has to create it into a separate file, or change the name to something like myApp.log.A etc......
Any ideas.
Yeah.....I'm going to need you to go ahead and come in on Saturday.....Yeah.....That'd be great.