You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Mark Kurley <MK...@p21.com> on 2002/03/25 20:37:06 UTC

Log4J and multiple threads

I have written a custom appender and layout for our application.  It runs in
a multiple thread environment and I have noticed that one thread will call
the close method then another thread will call the append method.  This
causes a null pointer exception because a resource was closed in the close
method and the append method is trying to access it.

Does each instance of a category create it's own instances of appenders and
layouts?
Who calls the close method?

Also,  want would be the best way to synchronize the code?  

Any ideas would help.

Thanks


Visit our website at http://www.p21.com/visit 
The information in this e-mail is confidential and may contain legally
privileged information.  It is intended solely for the person or entity to
which it is addressed.  Access to this e-mail by anyone else is
unauthorized. If you are not the intended recipient, any disclosure,
copying, distribution, action taken, or action omitted to be taken in
reliance on it, is prohibited and may be unlawful.  If you received this
e-mail in error, please contact the sender and delete the material from any
computer. 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>