Thank you very much! I'll try. What about the second situation I described? 1) A single application 2) Two appenders writing on the same file (but with different layout and level). Is it not an acceptable configuration?
S. =================================== Sara Pavan Software Developer ONE-ANS email: [EMAIL PROTECTED] =================================== -----Original Message----- From: James Stauffer [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 28, 2006 15:45 To: Log4J Users List Subject: Re: Same configuration file for application running in different JVMs You shouldn't have two JVM's writing to the same file. If you want logs from 2 JVMs to go to the same file you can have them send out the logs on a SocketAppender and have a ServerSocket(name?) receive them and write them to the file. On 6/28/06, Pavan Sara (CONS), IT <[EMAIL PROTECTED]> wrote: > Hi all, > I'm using Log4j (log4j-1.2.9.jar) for two applications (two JVMs) > which use the same configuration file and write onto the same > log files. > Traces seem correct, but the RollingFileAppender doesn't work. > There's no backup file but the log is reset when max size is reached. > > I've recreated the "same" error using only one application, but > with two appenders writing onto the same file (for example with > a layout different). > > In particular the problems seem to be: > 1) the "renameTo" method fails; > 2) the condition when applying rollOver is not updated. > > I extended the RollingFileAppender with a class which: > - overloads rollOver() method (replacing the "renameTo" call) > - overloads subAppend() method (performing a refresh of file features > before doing the check of its size). > > The situation is certainly improved, but there are still some bugs > because sometimes some files are smaller and some traces miss. > > Any suggestions? > What am I doing wrong? > I've also looked at log4j-1.2.13.jar, but its behaviour seem the same. > > Thanks, > S. > > =================================== > Sara Pavan > Software Developer > ONE-ANS > > email: [EMAIL PROTECTED] > =================================== > > > > > ======================================================== > CONFIDENTIALITY NOTICE > > This message and its attachments (if any) may contain confidential, > proprietary or legally privileged information and it is intended only for > the use of the addressee named above. No confidentiality or privilege > is waived or lost by any mistransmission. > > If you are not the intended recipient of this message you are hereby > notified that you must not use, disseminate, copy it in any form or take > any action in reliance on it. If you have received this message in error, > please, delete it (and any copies of it) and kindly inform the sender, of this > e-mail, by replying or go to www.pirelli.com on "contact us". > ======================================================== > > -- James Stauffer Are you good? Take the test at http://www.livingwaters.com/good/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ======================================================== CONFIDENTIALITY NOTICE This message and its attachments (if any) may contain confidential, proprietary or legally privileged information and it is intended only for the use of the addressee named above. No confidentiality or privilege is waived or lost by any mistransmission. If you are not the intended recipient of this message you are hereby notified that you must not use, disseminate, copy it in any form or take any action in reliance on it. If you have received this message in error, please, delete it (and any copies of it) and kindly inform the sender, of this e-mail, by replying or go to www.pirelli.com on "contact us". ======================================================== --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
