aspose file tools*
The moose likes Websphere and the fly likes Log4j-DailyRollingFileAppender not woking with Websphere Application Server 6.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Log4j-DailyRollingFileAppender not woking with Websphere Application Server 6.1" Watch "Log4j-DailyRollingFileAppender not woking with Websphere Application Server 6.1" New topic
Author

Log4j-DailyRollingFileAppender not woking with Websphere Application Server 6.1

Javish Kathuria
Greenhorn

Joined: Jan 01, 2010
Posts: 3
Here is the snapshot of my log4j properties file:

log4j.rootLogger=INFO, A1

log4j.appender.A1 = org.apache.log4j.DailyRollingFileAppender
log4j.appender.A1.File = /ezAirLog.log
log4j.appender.A1.Append = true
log4j.appender.A1.DatePattern = '.'yyyy-MM-dd
log4j.appender.A1.layout = org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern = %d [%t] %-5p %C - %m%n


I'm using the log4j with IBM Websphere Application Server 6.1. The above code worked perfectly for three days and then it stopped rolling. i.e. it is not able to rename the file for backup when the date changes.

Also, when I restart the server I get a warning message "Unable to set the append property of log4j". The oproblem starts here because whenever the append property is not set it can't rename the previous day file as it has to append the previous day date with the filename to back up the file.

Can anyone please help. It's very urgent as it is a UAT issue.

Thanks.


Cheers
Javish
Arindam Sikdar
Greenhorn

Joined: Jan 07, 2010
Posts: 1
check with the permission of log file


Thanks,
Arindam

IBM Certified System Administrator - WebSphere Application Server Network Deployment V6.0
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

Javish Kathuria wrote:Also, when I restart the server I get a warning message "Unable to set the append property of log4j". The oproblem starts here because whenever the append property is not set it can't rename the previous day file as it has to append the previous day date with the filename to back up the file.


The default value for the "append" property is true, according to the API documentation I have here. So you don't need that line at all. And the "append" property has nothing at all to do with renaming of the file when it rolls over to the next day.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Log4j-DailyRollingFileAppender not woking with Websphere Application Server 6.1