commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark R. Diggory" <mdigg...@latte.harvard.edu>
Subject Wire Logging in Http Client
Date Mon, 23 Sep 2002 22:22:16 GMT
I think I see my logging issue. The wire logger seems to get initialized 
without the "base package name". Was this intentional?

it gets instantiated as:

private static final Log wireLog = LogFactory.getLog("httpclient.wire");

It might be better for users of the package who are dealing with logging 
issues if this were within the category "org.apache.commons.httpclient" 
such that it could be turned on and of  using the absolute package name.

IE:

private static final Log wireLog = 
LogFactory.getLog("HttpConnection.class");

builds a Logger with the category 
"org.apache.commons.httpclient.HttpConnection"

private static final Log wireLog = LogFactory.getLog("httpclient.wire");

builds a Logger with the category "httpclient.wire"

it might be better to instatiate it as

private static final Log wireLog = 
LogFactory.getLog(""org.apache.commons.httpclient.wire");

then it can be controlled within the same category as the client:

In Log4J

    <logger name="org.apache.commons.httpclient" additivity="false">
        <level value="error"/>
        <appender-ref ref="CONSOLE"/>
    </logger>

would set logging in the HttpClient to error including the wire log.

Just my 2Cents,
Mark






--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message