I've heard of this SocketServer. I'll have to check it out. Thanks.

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Monday, August 18, 2008 7:44 AM
To: Log4CXX User
Subject: RE: Is this a bug or user error?

 


Peter - 

We've had the exact same requirement on platform we did, which used
Log4j... and ended up running the included "SocketServer" app and then
logging everything to the socket-server, which actually wrote out the
combined file. 

Renny Koshy
President & CEO

--------------------------------------------
Rubix Information Technologies, Inc.
www.rubixinfotech.com 



"Peter Steele" <[EMAIL PROTECTED]> 

08/18/2008 10:35 AM 

Please respond to
"Log4CXX User" <log4cxx-user@logging.apache.org>

To

"Log4CXX User" <log4cxx-user@logging.apache.org> 

cc

        
Subject

RE: Is this a bug or user error?

 

                




A multi-file-appender would be a great addition. I guess in the meantime
the only solution is to either have all of the applications log to their
own log file or implement a log server. We clearly can't continue to use
the configuration we have now...

-----Original Message-----
From: Curt Arnold [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 15, 2008 11:27 AM
To: Log4CXX User
Subject: Re: Is this a bug or user error?


On Aug 15, 2008, at 10:59 AM, Peter Steele wrote:

> We use the DailyRollingAppender, defined as follows in our config  
> file:
>
>    <appender name="FILE"  
> class="org.jboss.logging.appender.DailyRollingFileAppender">
>       <errorHandler  
> class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
>       <param name="File" value="<logfile>"/>
>       <param name="Append" value="true"/>
>
>       <!-- Rollover at midnight each day -->
>       <param name="DatePattern" value="'.'yyyy-MM-dd"/>
>
>      <layout class="org.apache.log4j.PatternLayout">
>        <param name="ConversionPattern" value="%d %-5p [%c{1}] %m%n"/>
>      </layout>
>    </appender>
>
> Several applications log to the same log file using this appender.  
> What's happening is when the rollover occurs at midnight, some  
> processes still log to the original file, which has now been  
> renamed, whereas others log to the main log file as they should. I'm  
> suspecting that this is an error on our part and we should not have  
> multiple processes all log to the same file, although I've heard  
> that others do this. What's the solution?
>

log4cxx's RFAs mimics log4j's RFAs and having multiple independent  
applications attempt to write to the same location is a common  
misconfiguration problem in the log4j world.  There is no mechanism  
(at least using java.io) to detect the situation, so the best we can  
do is to tell people not to do it.

You are apparently running on non-Windows platform.  What is occurring  
is that one application rolls over renaming the previous log file and  
creates the new log file, when other applications decide that it is  
time to roll over, then fail to create the new log file and continue  
to write to their old handle (which has been renamed since they  
originally opened it).

There has been a long stalled initiative to develop a  
MultiFileAppender for log4j which may handle the situation more  
gracefully (not its main objective), but that development has been  
stalled for a year or so.

Reply via email to