Author |
Message
|
hayderr |
Posted: Tue May 29, 2007 9:01 pm Post subject: Log4j Problem |
|
|
Novice
Joined: 14 May 2007 Posts: 22
|
Hello All,
I have a problem with Log4j. It is not taking a backup of the log file, although I specify it in my properties file.
log4j.logger.errorLog.log=DEBUG, errLog
log4j.appender.errLog=org.apache.log4j.RollingFileAppender
log4j.appender.errLog.file=C:\\Logs\\fileName.txt
log4j.appender.errLog.MaxFileSize=10KB
log4j.appender.errLog.MaxBackupIndex=5
log4j.appender.errLog.layout=org.apache.log4j.PatternLayout
log4j.appender.errLog.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %m%n
#log4j.appender.errLog.layout.ConversionPattern=%d %-5p %t %x - %m%n
#log4j.appender.errLog.Append=true
The only thing I could think of is a permission issue. As this is on a Test server, where it works fine on my local machine.
Could some1 help me with this please? |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Tue May 29, 2007 11:11 pm Post subject: Re: Log4j Problem |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
How do you use Log4J ?
Is it web application ?
If yes, Can you check server logs ?
If you think it is permission issue, have you checked user running your code permissions ? _________________ Marcin |
|
Back to top |
|
 |
hayderr |
Posted: Wed May 30, 2007 12:33 am Post subject: |
|
|
Novice
Joined: 14 May 2007 Posts: 22
|
I am using Message Broker V6. I have checked the permissions of the Broker Admin, and it is Admin rights.
I even tried changing the properties file to DailRollingAppender, and the same problem happens
Any other suggestions?
Thanks for the reply |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Wed May 30, 2007 12:38 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
Have you checked Windows Event log ? _________________ Marcin |
|
Back to top |
|
 |
hayderr |
Posted: Wed May 30, 2007 1:02 am Post subject: |
|
|
Novice
Joined: 14 May 2007 Posts: 22
|
I have checked the Event Logs, and there is nothing there related to the log4j stuff.
If I use the DailyRollingAppender and set it to be changed every 1 minute, it does create a file after 1 minute, but then it overwrites itself after creating the first file.
I dont know where else to look, Thanks |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Wed May 30, 2007 1:29 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
hayderr wrote: |
If I use the DailyRollingAppender and set it to be changed every 1 minute, it does create a file after 1 minute, but then it overwrites itself after creating the first file.
I dont know where else to look, Thanks |
Sorry but I don't get.
Maybe I didn't understand your problem.
It is normal behavior.
When DailyRollingAppender generates "backup file" it also make actual log file empty. _________________ Marcin |
|
Back to top |
|
 |
hayderr |
Posted: Wed May 30, 2007 1:32 am Post subject: |
|
|
Novice
Joined: 14 May 2007 Posts: 22
|
Yeah, thats correct. But the Problem is it will never create a another file after the 2nd minute. It keeps overwriting the main file.
Thanks |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Wed May 30, 2007 1:39 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
hayderr wrote: |
Yeah, thats correct. But the Problem is it will never create a another file after the 2nd minute. It keeps overwriting the main file.
Thanks |
Sorry, OK. I see.
So it is not permission problem.
What Log4J version do you use ?
Have you checked it outside broker in standard application ? _________________ Marcin |
|
Back to top |
|
 |
|