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 Ionel GARDAIS <ig...@yahoo.fr> on 2004/11/09 18:33:27 UTC
use both programmatic and file configuration
Hi,
I'd like to provide a way to add loggers/appenders to
log4j whereas I have already configured it
programmaticaly with a default, unremoveable appender.
That is, I have a ConsoleAppender or FileAppender
(defined in code) and I'd like to allow the user to
add an SMTPAppender if he wants to.
How could I archieve this ?
Does the fact that the user provides a log4j
configuration file annihilate the programmatic part ?
thanks,
Ionel
Vous manquez despace pour stocker vos mails ?
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/
Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: use both programmatic and file configuration
Posted by Ceki Gülcü <ce...@qos.ch>.
Ionel,
If your programmatically configured appender is attached to a logger, say
x, and your user's SMTPAppender (configured using a script) is attached to
logger y, where x != y, then user's configuration will not override the
programmatic configration. However, if x=y then, your programmatically
configured appender will be closed before SMTPAppender is attached to logger x.
Does that help?
At 06:33 PM 11/9/2004, Ionel GARDAIS wrote:
>Hi,
>
>I'd like to provide a way to add loggers/appenders to
>log4j whereas I have already configured it
>programmaticaly with a default, unremoveable appender.
>
>That is, I have a ConsoleAppender or FileAppender
>(defined in code) and I'd like to allow the user to
>add an SMTPAppender if he wants to.
>
>How could I archieve this ?
>Does the fact that the user provides a log4j
>configuration file annihilate the programmatic part ?
>
>thanks,
>Ionel
--
Ceki Gülcü
For log4j documentation consider "The complete log4j manual"
http://www.qos.ch/shop/products/eclm/
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org