[jboss-jira] [JBoss JIRA] Commented: (JBLOGGING-57) Logic for selecting a provider is too fragile

David Lloyd (JIRA) jira-events at lists.jboss.org
Wed Mar 23 16:00:48 EDT 2011


    [ https://issues.jboss.org/browse/JBLOGGING-57?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12591389#comment-12591389 ] 

David Lloyd commented on JBLOGGING-57:
--------------------------------------

The multiple try blocks here are not a style choice - they exist so that each framework can be detected separately; that is, they have a functional purpose.  If I went to one, then log4j and logback would be undetectable.

The risk of detecting an incompatible version of log4j is exceedingly low since that framework has existed for a very long time.  I'm not concerned about an incompatible log4j API change.  And logback is special in that it uses slf4j as the API, and Ceki has, as far as I understand, committed to long-term compatibility of the slf4j API.  The worst that could happen would be that logback would change incompatibly and thus it would fail to be detected, but this won't really cause any serious functional detriment.

This issue is invalid primarily due to the subjective nature of the word "Fragile".  If you can't measure it then I can't fix it.  JBLOGGING-47 on the other hand is a quantifiable problem with a specific solution.  Feeling leery about something is not something I can fix.

> Logic for selecting a provider is too fragile
> ---------------------------------------------
>
>                 Key: JBLOGGING-57
>                 URL: https://issues.jboss.org/browse/JBLOGGING-57
>             Project: JBoss Logging
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 3.0.0.Beta4-jboss-logging
>            Reporter: Dan Allen
>            Assignee: David Lloyd
>             Fix For: 3.0.0.Beta5-jboss-logging
>
>
> The logic used to select the logging provider is too fragile. It should never throw an exception while selecting a provider, because JDK logging is guaranteed to be available and should be the fallback choice. When JBoss Logging fails to select a provider, it causes deployment to fail, which violates my rule #1 of a logging framework (don't fail a build because of a failure to setup logging).
> The fragile logic is the reason we get JBLOGGING-47.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list