commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <robertburrelldon...@blueyonder.co.uk>
Subject Re: [logging] Exception handling in LogFactoryImpl [WAS] a candidate explanation for "Log4JLogger does not implement Log"
Date Wed, 25 May 2005 20:38:07 GMT
On Mon, 2005-05-23 at 23:05 -0700, Brian Stansberry wrote:

<snip>

> I've had a chance to look at the refactored version of
> LogFactoryImpl I'd done, and it should be quite simple
> to offer configurable options for this.  The current
> patch includes a method "recordCreationFailure" that
> gets called when an adapter is "discovered" but fails
> in the instance creation process.  It's simple to
> rename that method to something more general and add a
> bit of logic to check a configuration option (i.e
> system property or a property in
> commons-logging.properties), and either throw a
> LogConfigurationException or record the exception
> using the new diagnostics code.
> 
> Which way to go as a default when the config option
> isn't set is another question.  Personally, I'm also
> of the "logging should not fail an app" opinion.
> 
> It should also be fairly simple to cache any exception
> that occurs during the discovery process, and then if
> a Log is eventually found to record the cached
> exception as a warning.  This will provide feedback to
> users who don't have the JCL diagnostics turned on.

that all sounds good

- robert


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message