logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: Log4j output empty line on Solaris 10 (4 CPU)
Date Wed, 22 Oct 2008 13:51:15 GMT

On Oct 22, 2008, at 8:38 AM, wuhao wrote:

> Hello Everyone, Hope you have a nice day.
> I am using log4j 1.2.15 on Solaris 10 which has 4 cpu. When I  
> simultaneously
> executed 2 java programs that
> output to the same log file, the log4j output a empty line and  
> didn't output
> some messages that were supposed to be writed to the log file.
> When I tested this on one cpu Solaris machine, this phenomenon never
> happened. Is it because of multiple
> cpu?
> How can I solve this problem?
> Any of your help and suggesution will be a big help to me.
> Thanks a lot!

java.io does not offer any guarantees around simultaneous writes to  
the underlying file, so users should avoid multiple instances of  
FileAppender or derivatvies from writing to the same log file.

I believe that java.nio does and have hoped to work on a java.nio  
based FileAppender analog, but have not had time to work on it.  If  
you'd be interested in testing it, I could take a shot at getting  


To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message