Thanks for the clarification. I suppose that if I wanted to disable a logger [when rootLogger has an appender], then I should point my OFF-level logger to a NullAppender?
- Howard ----- Original Message ----- From: Blok, Eelke <[EMAIL PROTECTED]> To: Log4J Users List <[email protected]> Sent: Tue Dec 18 03:19:00 2007 Subject: RE: logger w/o any appender I would say that if the situation that a warning is pointing out is as expected, you can ignore it (after all, it's a warning, not an error). However, commonly, you configure loggers to log something, and if there are no appenders to catch the log messages produced by the logger, 9 times out of 10 that would not be what you want and may indicate a mistake in your configuration. Hence, a warning is produced. Apparently, the warning mechanism doesn't check if the logger has been turned off. (With that said, logger log level configuration tends to be more dynamic, being changed all the time to change which parts of the logger tree are examined, while appender configuration is more static; typically you would not shift around or remove appenders just because they would not receive any log message for the current logger configuration. The logger configuration may be different tomorrow, or in five minutes, at which time a missing appender may well be a problem, so not checking whether the logger happens to be turned off can actually be useful, in some situations). -----Original Message----- From: Mak, Howard [mailto:[EMAIL PROTECTED] Sent: maandag 17 december 2007 20:06 To: '[email protected]' Subject: logger w/o any appender If my log4j.properties has log4j.logger.MYLOG = OFF log4j.additivity.MYLOG = false Log4j prints log4j:WARN No appenders could be found for logger (MYLOG.SUBLOG). log4j:WARN Please initialize the log4j system properly. Is an appender always required even if log level is OFF? Thanks for any help. - Howard --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
