[logback-user] Logback fallback behaviour in case auto config fails ...
ceki
ceki at qos.ch
Tue Oct 25 12:47:39 CEST 2011
Hi David,
Your description of logback configuration procedure is pretty
accurate. BasicConfigurator is invoked only if no configuration file
could be found. In other words, the user presumably does not care to
customize logging and we automatically provide a reasonable
configuration. In the case the user provides a configuration file but
one which is ill-formed, the previous logic no longer applies.
--
Ceki
http://twitter.com/#!/ceki
On 25/10/2011 2:38 AM, jakartaman wrote:
> Hi again
>
> Noticed that logback basically bails out if none the default
> configuration resources can be found.
>
> I.e. in
>
> ch.qos.logback.classic.util.ContextInitializer.autoConfig()
>
> -> If an initial resource is *not* found, BasicConfigurator is invoked,
> -> If an initial resource *is* found, either Groovy Configurator or
> JoranConfigurator are invoked on the resource depending on their ending.
> -----> But if I understand correctly, that may fail (e.g. because of bad
> XML), in which case configuration is left ... unconfigured. Shouldn't
> the logic be changed to fall back to BasicConfigurator in that case also?
>
> Best regards,
>
> -- David
More information about the Logback-user
mailing list