You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by robert burrell donkin <ro...@blueyonder.co.uk> on 2005/05/25 22:38:07 UTC

Re: [logging] Exception handling in LogFactoryImpl [WAS] a candidate explanation for "Log4JLogger does not implement Log"

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