At 2004-12-16 16:51:31, Richard Sitze wrote:

> I do not advocate a fail-on-no-config or fail-on-ambiguous-config.
>
> I advocate a *warn* or *error* on either, using the simple default logger.
> The warning will be visible on the console, which suffices for my
> immediate concerns.  How that warning/error (in general) is managed is up
> to the application environment.

Log4j 1.3 can use itself for its own logging. So, when appender A
fails, it can report errors using appender B. Appender B could alert the
system admin if that is the desired behavior.

The same goes for configuration errors which are also accessible
programmatically. For example,


Configurator c = new SomeLog4jConfigurator(); c.configure("some file"); List el = c.getErrorList(); if(el.size > 0) { if(analyzeErrors(el)) { // errors during logging configuration throw new IllegalStateException("Can't proceed withour logging"); } }

  boolean analyzeErrors(List el) {
    // custom analysis of the errors go here
    return true/false;
  }

It seems to me that log4j already fulfills Richard's requirements wrt
logging errors and logging configuration.


-- Ceki Gülcü

  The complete log4j manual: http://www.qos.ch/log4j/



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



Reply via email to