As we are using WebLogic, I post this here for your help.
We have two managed server on one UNIX box and I have the following Log4j Configuration to gather the logs into one log file. But the log got lost during the midnight when it rolled over. So my question is can I configure it to write to the same log file using DailyRollingFileAppender? If not, what's the best practise for logging applications with two managed servers? Any suggestion will be much appreciated.
I don't think that having one log file for two or more processes is a good idea. With the default locking mechanisms on Unix you could easily intermix output from the two and it would be difficult to figure out what information came from what server.
Perhaps a better way would be to have a log file for each server. As the log4j config file can read Java system variables, you could use "weblogic.Name" as one of your parameters. So, for example:
or something like that.
<a href="http://forums.hotjoe.com/forums/list.page" target="_blank" rel="nofollow">Java forums using Java software</a> - Come and help get them started.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: How to configure Log4j with two managed server?