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 Wolfgang Stein <zo...@gmd-net.de> on 2002/11/27 17:35:45 UTC

Connecting one Appender to several Loggers

Hi,

is it possible to connect one specific Logger to
different Loggers?
Or would i encounter synchronization problems etc.?

For specific reasons i deployed an entity-based
logger-hierarchy (instead of a package-based tree).

The problem i am facing now is, that some nodes although in
different branches belong to the same kind of category.
These categories should log into one special file.


               planets
              /   |   \
             /    |    \      
            /     |     \      
         earth  venus  jupiter
           |              |
           |              |
         moons          moons
           |            / |  \
	   |           /  |   \
       TheMoon   Ganymed ... Kallisto 

In the example above i were interested only in 
the activities of moons and would like to 
connect a 'MoonFileAppender' to both
"planets.earth.moons" and "planets.jupiter.moons".


Does that work?
I searched the archives, but because i am new
to log4j i could not find any relevant information
(or didn't understand it  :-)

Thanks in Advance
Wolfgang

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


RE: Connecting one Appender to several Loggers

Posted by Thomas Muller <tt...@online.no>.
Appenders should be thread-safe, hence a single appender can be added to
multiple loggers.

--

Thomas



| -----Original Message-----
| From: Wolfgang Stein [mailto:zorro@gmd-net.de]
| Sent: 27 November 2002 16:36
| To: log4j-user@jakarta.apache.org
| Subject: Connecting one Appender to several Loggers
|
|
| Hi,
|
| is it possible to connect one specific Logger to
| different Loggers?
| Or would i encounter synchronization problems etc.?
|
| For specific reasons i deployed an entity-based
| logger-hierarchy (instead of a package-based tree).
|
| The problem i am facing now is, that some nodes although in
| different branches belong to the same kind of category.
| These categories should log into one special file.
|
|
|                planets
|               /   |   \
|              /    |    \
|             /     |     \
|          earth  venus  jupiter
|            |              |
|            |              |
|          moons          moons
|            |            / |  \
| 	   |           /  |   \
|        TheMoon   Ganymed ... Kallisto
|
| In the example above i were interested only in
| the activities of moons and would like to
| connect a 'MoonFileAppender' to both
| "planets.earth.moons" and "planets.jupiter.moons".
|
|
| Does that work?
| I searched the archives, but because i am new
| to log4j i could not find any relevant information
| (or didn't understand it  :-)
|
| Thanks in Advance
| Wolfgang
|
| --
| To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>




*************************************************************************
Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights reserved. 
The information supplied in this Commercial Communication should be treated
in confidence.
No liability whatsoever is accepted for any loss or damage 
suffered as a result of accessing this message or any attachments.

________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com
________________________________________________________________________

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