I just joined the list so I missed the original post.
Is this about Log4J not rolling over files properly with the
RollingFileAppender?

We ended up writing a modified version because for some reason it held locks
and wouldn't 'rollover' properly, so we lost the log files.
Let me know if this is what you are experiencing and I'll dig out the code.
Also, what operating system are you running on?

Regards,

Tim.

----- Original Message ----- 
From: "Shapira, Yoav" <[EMAIL PROTECTED]>
To: "Log4J Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, October 28, 2003 5:55 AM
Subject: RE: log4j losing log files



Howdy,
I don't have a solution to your problem, just a couple of
points/questions. ;)



>The log4j1.2.8.jar file is in each webapp/WEB-INF/lib.
>Each webapp has its own config file in webapp/WEB-INF/classes.

Good.

>Each config file contains:
>
>log4j.rootLogger=DEBUG
>log4j.logger.dev=DEBUG, dev
>
>log4j.appender.stdout=org.apache.log4j.ConsoleAppender
>log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
>log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
>
>log4j.appender.dev=org.apache.log4j.RollingFileAppender
>log4j.appender.dev.File=C:/logs/dev_01.log
>log4j.appender.dev.layout=org.apache.log4j.PatternLayout
>log4j.appender.dev.layout.ConversionPattern=%d %X{RemoteHost} %C %-5p
%c
>- %m%n
>log4j.appender.dev.MaxFileSize=1000KB
>log4j.appender.dev.MaxBackupIndex=100

Why define the stdout appender if you don't use it?  Try removing it.

I haven't used the straight rolling file appender much.  I mostly use
the DailyRollingFileAppender and haven't had a problem with it.  Perhaps
you could give this a shot (again, as you say you've done it in the
past) and see what happens.

>That way, I can get such a list of files as:
>.log
>.log.10
>.log.11
>.log.12
>.log.13
>.log.14
>.log.15
>.log.16
>.log.17
>.log.18
>.log.19
>.log.20
>.log.49
>.log.50
>.log.51
>.log.52
>.log.53
>
>I simply don't have any idea about what is going on. I spend a lot of

Add -Dlog4j.debug=true to your JAVA_OPTS when launching tomcats.  Log4j
will then output internal debugging information to
$CATALINA_HOME/logs/catalina.out.  Perhaps that will tell you something
useful, especially when you see the output generated when log4j is
rolling files over.

Yoav Shapira



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to