hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 19426] New: - Logging cannot be turned off when Log4J is in classpath
Date Tue, 29 Apr 2003 13:49:05 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19426>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19426

Logging cannot be turned off when Log4J is in classpath

           Summary: Logging cannot be turned off when Log4J is in classpath
           Product: Commons
           Version: 2.0 Alpha 3
          Platform: PC
               URL: http://www.atobemobile.com
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: HttpClient
        AssignedTo: commons-httpclient-dev@jakarta.apache.org
        ReportedBy: dejan.novakovic@atobemobile.com
                CC: dejan.novakovic@atobemobile.com


There is a problem turning off logging when Log4J is in the classpath. On the 
other hand, when Log4J (version 1.2.6) is not in the path the following line 
stops any logging from HttpClient:
  System.setProperty("org.apache.commons.logging.Log",
                     "org.apache.commons.logging.impl.NoOpLog");

Reading the API documentation about default implementation of LogFactory I see 
that Log4J is lower in the rules list for determining Log instance, so this 
seems to me like a bug.

We use Log4J logging framework ONLY indirectly, as an underlying implementation 
of our own error-handling framework, so we need to keep it in the path. At the 
same time, of course, all error handling we want to go through our framework, 
not through Log4J framework.

Mime
View raw message