jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] Updated: (JCR-215) Code is depends on Log4J directly instead of commons-logging
Date Wed, 28 Sep 2005 22:21:04 GMT
     [ http://issues.apache.org/jira/browse/JCR-215?page=all ]

Jukka Zitting updated JCR-215:
------------------------------

    Attachment: jackrabbit.slf4j.patch

The attached patch replaces all log4j references with the equivalent slf4j code. The detailed
changes are:

    * Replace the log4j dependency with nlog4j in project.xml
    * Replace org.apache.log4j.Logger with org.slf4j.Logger
    * Replace org.apache.log4j.Logger.getLogger() with org.slf4j.LoggerFactory.getLogger()
    * Replace org.apache.log4j.Logger.fatal() with org.slf4j.Logger.error()
    * Adjust some log method arguments as required by the API change (e.g. Object -> String)
    * Remove the (unused) ability to set log level in org.apache.jackrabbit.test.LogPrintWriter

Note that the last change touches the TCK test suite and can break test setups that specifically
modify the logging level of test output. Perhaps we should keep using log4j for the test suite?

I used the slf4j-compliant nlog4j library as a dependency instead of the smaller slf4j alternatives.
The nlog4j library is a slightly modified version of log4j, so this change should be mostly
invisible to end users unless they want to switch to using some other logging framework with
slf4j support.

I didn't commit these changes directly as there might yet be other opinions on this matter.
If so, please comment this issue. Unless anyone objects, I'll commit the patch within a few
days.


> Code is depends on Log4J directly instead of commons-logging
> ------------------------------------------------------------
>
>          Key: JCR-215
>          URL: http://issues.apache.org/jira/browse/JCR-215
>      Project: Jackrabbit
>         Type: Improvement
>     Reporter: Ragy Eleish
>     Assignee: Jukka Zitting
>     Priority: Minor
>      Fix For: 1.0
>  Attachments: jackrabbit.slf4j.patch
>
> The code is written against the Log4J APIs, which forces all users of Jackarabbit to
pick up log4J dependency and to juggle with JDK logging and Log4J configuration if other components
of the project uses JDK 1.4 logging.
> If the code is move to depend on Apache commons-logging this issue will be resolved.
Also this should be a minor fix.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message