• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Log4j-DailyRollingFileAppender not woking with Websphere Application Server 6.1

 
Javish Kathuria
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Arindam Sikdar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check with the permission of log file
 
Paul Clapham
Sheriff
Posts: 21119
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic