logging-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: multi thread log corruption
Date Thu, 15 Sep 2005 04:15:45 GMT

On Sep 14, 2005, at 9:44 PM, jecrotea@ca.ibm.com wrote:

> Hi all,
>       I have a little problem. I read that log4j is thread-safe in the
> manual. I have a mutlthreaded environnement. I have a base class  
> that I
> launch, that is launching many threads depending on a configuration  
> file.
> Each of those threads are named with a name that represent the  
> Runnable
> class that is start in a new thread. I would like to a a log file  
> that logs
> EVERY event, and 1 log file per differents names of the thread.
> Ex: base class launch 3 threads of type A, 5 threads of type B and  
> 1 thread
> of class C =
>       1 log file for the base class that will also logs type A, B,  
> C event,
>       1 log file for threads of type A (3 threads write in it)
>       1 log file for threads of type B (5 threads write in it)
>       1 log file for threads of type C (1 thread write in it)
> So I based myself on a ThreadFileAppender that I found with the  
> help of
> google. Here is the code:

Logging-general is designed for conversations involving more that one  
LS project.  For example, a discussion about compatibility between  
log4cxx and log4j, would be an appropriate topic for logging-general.

For questions regarding use of log4j, log4j-user would be the  
appropriate forum.  However, as far as I can tell from your message,  
you are not having problems with log4j, but with a custom appender  
that you found somewhere on the net.  If so, it would be best to  
contact the author of the appender. 

View raw message