Hi,
You can modify the levels for loggers and the thresholds for appenders on the fly, no 
problem.

Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: Ionel GARDAIS [mailto:[EMAIL PROTECTED]
>Sent: Friday, October 01, 2004 11:13 AM
>To: [EMAIL PROTECTED]
>Subject: muting appenders
>
>Hi,
>
>Sorry for the repost, I may have missed your answers.
>
>I have two appenders : ConsoleAppender and
>FileAppender.
>These two appenders are attached to a unique logger.
>
>Is there a way to "mute" a logger or the other "on the
>fly" so I can log on Console only, FileAppender only
>or both ?
>
>BTW, my logging initialization is like this :
>
><code>
>Logger log4jLogger = null;
>static {
>  Layout patternLayout = new PatternLayout("%d [%t]
>%-5p - %m%n");
>  Appender consoleAppender = new
>ConsoleAppender(patternLayout);
>  log4jLogger = Logger.getLogger("myClass");
>  log4jLogger.addAppender(consoleAppender);
>  log4jLogger.setLevel(Level.ALL);
>}
></code>
>
>As i am adapting a proprietary logging API to Log4j,
>this is the only initialization part I am going thru.
>Classes never reference the log4jLogger logger.
>
>According to this, what about the rootLogger ?
>What are its configuration values (appenders, level) ?
>Should I better use
><code>
>  log4jLogger = Logger.getRootLogger();
></code>
>instead of
><code>
>  log4jLogger = Logger.getLogger("myClass");
></code>
>
>in order to init only the root logger ?
>
>
>Ionel
>
>
>
>
>
>
>Vous manquez d'espace 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: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to