[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4j-user
Subject:    Sharing Appenders in different categories
From:       Klaus Mueller <k.mueller () intershop ! de>
Date:       2002-01-29 9:18:58
[Download RAW message or body]

Hi,

I need to share one appender to different categories.

Example:

FileAppender A

Categories

C1 - Log.gui.windows.Main
C2 - Log.gui.windows.Sub
C3 - Log.core.utils.Calculator

I want to attach the appender A to categories C1 and C3. Each message of
these categories need to go to the same file.

Problem:
I checked the Category and Appender sources. The synchronization for multi
thread access is at Category level. This means that the logging at one
category is serialized. But the appender can get messages from different
categories at the same time.

I know I can add a appender at the category "Log" filter for category names,
but this is times slower then setting one appender to the interesting
categories.

Questions:

1. Is this right?
2. How can I share an appender at different categories (multi thread
application)?

Thanks
Klaus

--
To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic