wood burning stoves 2.0*
The moose likes Other Open Source Projects and the fly likes Log4j logging file failed to roll in a clustered environment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Log4j logging file failed to roll in a clustered environment " Watch "Log4j logging file failed to roll in a clustered environment " New topic
Author

Log4j logging file failed to roll in a clustered environment

Ingoba Ningthoujam
Ranch Hand

Joined: Dec 04, 2006
Posts: 90
Hi,

I have configured RollingFileAppender (with TimeBasedRollingPolicy from log4j extras) in Log4j.properties for monthly rolling in a clustered environment (Websphere with 2 virtual servers(nodes) in single physical system). The log files are getting generated in all the 2 server locations but unfortunately only one node's log file is getting rolled over at the end of a month as mentioned in the Log4J.properties file. Also when I use the same properties file for single server, it works fine and the files are getting rolled over at the end of the month as mentioned there.

So what shall I do so that the Log files get rolled over in an clustered environment consisting of 2 nodes. Please advise me.

Regards,
Ingoba
Ingoba Ningthoujam
Ranch Hand

Joined: Dec 04, 2006
Posts: 90
Please anybody help.
Ingoba Ningthoujam
Ranch Hand

Joined: Dec 04, 2006
Posts: 90
Please help it is a critical issue ...
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9930
    
159

Log4j doesn't really have anything to do with clustering. Each system (JVM) will be independent and the rolling over of the files on that JVM is controlled by the file size/time and the log4j configurations.

[My Blog] [JavaRanch Journal]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Log4j logging file failed to roll in a clustered environment
 
Similar Threads
Log4j log file no getting rolled over at the end of the day
How to acces specific resource in a server in clustering
Daily log appender query
Header issue for DailyRollingFileAppender when rolled over
DailyRollingFileAppender problem