You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Wulf Wechsung (JIRA)" <ji...@apache.org> on 2011/02/07 13:58:30 UTC

[jira] Created: (HTTPCLIENT-1054) HTTPClient per default relentlessly spams to stderr

HTTPClient per default relentlessly spams to stderr
---------------------------------------------------

                 Key: HTTPCLIENT-1054
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1054
             Project: HttpComponents HttpClient
          Issue Type: Improvement
          Components: HttpClient
         Environment: all
            Reporter: Wulf Wechsung
            Priority: Minor


HTTPClient relentlessly spams to stderr when including it into a project via maven. This is not a decent default behaviour for a libary. Libaries should, per default, communicate their internal state solely and adequatly via their API and let it be up to the application to react to that state (logging it is one such reaction). From some replies to tickets in the same vain I can see that this is perhaps a sensitive topic as some see logging to be a core concern of HTTPClient. I do agree it's helpful as a debugging tool but as such it needs to be opt-in. As a standard error output, the logging of HTTPClient is absolutely useless because it does not and can not describe what the application is trying to do.

Why this improvement when there is a way to disable HTTClient logging (in fact, there seem to be many ways ... always a bad sign ..)?

Do a google search for: httpclient "console spam"
204 hit for this harsh phrasing alone. Search this phrase for any other libary you like to use and compare the number of hits. Ask youself, how often have you seen the java standard libary write to stdout or stderr?

Personally, I tried to disable it via JDK14 getLogger("org.apache").setLevel(Level.OFF)  which wouldn't work and now am using a solution I found on Stackoverflow which is:

System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.NoOpLog"); }

The problem I have is that I include this lib and suddently my console is useless because httpclient is all over it (writing a system monitor ...). I have to search google to find a solution (http://hc.apache.org/httpcomponents-client-ga/logging.html does not tell you how to turn logging off ...) and the logical one "turn of the JDK logger" does not work right away.

It's really a matter of following the principal of least suprise (a libary is not expected to write to the console which is the observable default behaviour of HTTPClient) and the principal of separation of concerns (logging is a concern for applications and not for libaries).

Following at least one of these would substantially increase the joy of working with the HTTPClient libary.



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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCLIENT-1054) HTTPClient per default relentlessly spams to stderr

Posted by "Wulf Wechsung (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12991851#comment-12991851 ] 

Wulf Wechsung commented on HTTPCLIENT-1054:
-------------------------------------------

Hello Oleg,

thanks for your response. Yes, I'm using 3.1 which I just assumed to be the latest.

Kind Regards,
Wulf

> HTTPClient per default relentlessly spams to stderr
> ---------------------------------------------------
>
>                 Key: HTTPCLIENT-1054
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1054
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>    Affects Versions: 3.1 Final
>         Environment: all
>            Reporter: Wulf Wechsung
>            Priority: Minor
>              Labels: default, logging, soc
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> HTTPClient relentlessly spams to stderr when including it into a project via maven. This is not a decent default behaviour for a libary. Libaries should, per default, communicate their internal state solely and adequatly via their API and let it be up to the application to react to that state (logging it is one such reaction). From some replies to tickets in the same vain I can see that this is perhaps a sensitive topic as some see logging to be a core concern of HTTPClient. I do agree it's helpful as a debugging tool but as such it needs to be opt-in. As a standard error output, the logging of HTTPClient is absolutely useless because it does not and can not describe what the application is trying to do.
> Why this improvement when there is a way to disable HTTClient logging (in fact, there seem to be many ways ... always a bad sign ..)?
> Do a google search for: httpclient "console spam"
> 204 hit for this harsh phrasing alone. Search this phrase for any other libary you like to use and compare the number of hits. Ask youself, how often have you seen the java standard libary write to stdout or stderr?
> Personally, I tried to disable it via JDK14 getLogger("org.apache").setLevel(Level.OFF)  which wouldn't work and now am using a solution I found on Stackoverflow which is:
> System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.NoOpLog"); }
> The problem I have is that I include this lib and suddently my console is useless because httpclient is all over it (writing a system monitor ...). I have to search google to find a solution (http://hc.apache.org/httpcomponents-client-ga/logging.html does not tell you how to turn logging off ...) and the logical one "turn of the JDK logger" does not work right away.
> It's really a matter of following the principal of least suprise (a libary is not expected to write to the console which is the observable default behaviour of HTTPClient) and the principal of separation of concerns (logging is a concern for applications and not for libaries).
> Following at least one of these would substantially increase the joy of working with the HTTPClient libary.

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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Updated: (HTTPCLIENT-1054) HTTPClient per default relentlessly spams to stderr

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1054?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski updated HTTPCLIENT-1054:
------------------------------------------

    Affects Version/s: 3.1 Final

> HTTPClient per default relentlessly spams to stderr
> ---------------------------------------------------
>
>                 Key: HTTPCLIENT-1054
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1054
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>    Affects Versions: 3.1 Final
>         Environment: all
>            Reporter: Wulf Wechsung
>            Priority: Minor
>              Labels: default, logging, soc
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> HTTPClient relentlessly spams to stderr when including it into a project via maven. This is not a decent default behaviour for a libary. Libaries should, per default, communicate their internal state solely and adequatly via their API and let it be up to the application to react to that state (logging it is one such reaction). From some replies to tickets in the same vain I can see that this is perhaps a sensitive topic as some see logging to be a core concern of HTTPClient. I do agree it's helpful as a debugging tool but as such it needs to be opt-in. As a standard error output, the logging of HTTPClient is absolutely useless because it does not and can not describe what the application is trying to do.
> Why this improvement when there is a way to disable HTTClient logging (in fact, there seem to be many ways ... always a bad sign ..)?
> Do a google search for: httpclient "console spam"
> 204 hit for this harsh phrasing alone. Search this phrase for any other libary you like to use and compare the number of hits. Ask youself, how often have you seen the java standard libary write to stdout or stderr?
> Personally, I tried to disable it via JDK14 getLogger("org.apache").setLevel(Level.OFF)  which wouldn't work and now am using a solution I found on Stackoverflow which is:
> System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.NoOpLog"); }
> The problem I have is that I include this lib and suddently my console is useless because httpclient is all over it (writing a system monitor ...). I have to search google to find a solution (http://hc.apache.org/httpcomponents-client-ga/logging.html does not tell you how to turn logging off ...) and the logical one "turn of the JDK logger" does not work right away.
> It's really a matter of following the principal of least suprise (a libary is not expected to write to the console which is the observable default behaviour of HTTPClient) and the principal of separation of concerns (logging is a concern for applications and not for libaries).
> Following at least one of these would substantially increase the joy of working with the HTTPClient libary.

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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCLIENT-1054) HTTPClient per default relentlessly spams to stderr

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12991377#comment-12991377 ] 

Oleg Kalnichevski commented on HTTPCLIENT-1054:
-----------------------------------------------

Which version of HttpClient is this issue for? 

Commons HttpClient 3.1 does indeed have a tendency of abusing INFO priority logs for logging often irrelevant details. This problem has long been solved in the 4.x series. 

Oleg

> HTTPClient per default relentlessly spams to stderr
> ---------------------------------------------------
>
>                 Key: HTTPCLIENT-1054
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1054
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>         Environment: all
>            Reporter: Wulf Wechsung
>            Priority: Minor
>              Labels: default, logging, soc
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> HTTPClient relentlessly spams to stderr when including it into a project via maven. This is not a decent default behaviour for a libary. Libaries should, per default, communicate their internal state solely and adequatly via their API and let it be up to the application to react to that state (logging it is one such reaction). From some replies to tickets in the same vain I can see that this is perhaps a sensitive topic as some see logging to be a core concern of HTTPClient. I do agree it's helpful as a debugging tool but as such it needs to be opt-in. As a standard error output, the logging of HTTPClient is absolutely useless because it does not and can not describe what the application is trying to do.
> Why this improvement when there is a way to disable HTTClient logging (in fact, there seem to be many ways ... always a bad sign ..)?
> Do a google search for: httpclient "console spam"
> 204 hit for this harsh phrasing alone. Search this phrase for any other libary you like to use and compare the number of hits. Ask youself, how often have you seen the java standard libary write to stdout or stderr?
> Personally, I tried to disable it via JDK14 getLogger("org.apache").setLevel(Level.OFF)  which wouldn't work and now am using a solution I found on Stackoverflow which is:
> System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.NoOpLog"); }
> The problem I have is that I include this lib and suddently my console is useless because httpclient is all over it (writing a system monitor ...). I have to search google to find a solution (http://hc.apache.org/httpcomponents-client-ga/logging.html does not tell you how to turn logging off ...) and the logical one "turn of the JDK logger" does not work right away.
> It's really a matter of following the principal of least suprise (a libary is not expected to write to the console which is the observable default behaviour of HTTPClient) and the principal of separation of concerns (logging is a concern for applications and not for libaries).
> Following at least one of these would substantially increase the joy of working with the HTTPClient libary.

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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Resolved: (HTTPCLIENT-1054) HTTPClient per default relentlessly spams to stderr

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1054?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCLIENT-1054.
-------------------------------------------

    Resolution: Fixed

> HTTPClient per default relentlessly spams to stderr
> ---------------------------------------------------
>
>                 Key: HTTPCLIENT-1054
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1054
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>    Affects Versions: 3.1 Final
>         Environment: all
>            Reporter: Wulf Wechsung
>            Priority: Minor
>              Labels: default, logging, soc
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> HTTPClient relentlessly spams to stderr when including it into a project via maven. This is not a decent default behaviour for a libary. Libaries should, per default, communicate their internal state solely and adequatly via their API and let it be up to the application to react to that state (logging it is one such reaction). From some replies to tickets in the same vain I can see that this is perhaps a sensitive topic as some see logging to be a core concern of HTTPClient. I do agree it's helpful as a debugging tool but as such it needs to be opt-in. As a standard error output, the logging of HTTPClient is absolutely useless because it does not and can not describe what the application is trying to do.
> Why this improvement when there is a way to disable HTTClient logging (in fact, there seem to be many ways ... always a bad sign ..)?
> Do a google search for: httpclient "console spam"
> 204 hit for this harsh phrasing alone. Search this phrase for any other libary you like to use and compare the number of hits. Ask youself, how often have you seen the java standard libary write to stdout or stderr?
> Personally, I tried to disable it via JDK14 getLogger("org.apache").setLevel(Level.OFF)  which wouldn't work and now am using a solution I found on Stackoverflow which is:
> System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.NoOpLog"); }
> The problem I have is that I include this lib and suddently my console is useless because httpclient is all over it (writing a system monitor ...). I have to search google to find a solution (http://hc.apache.org/httpcomponents-client-ga/logging.html does not tell you how to turn logging off ...) and the logical one "turn of the JDK logger" does not work right away.
> It's really a matter of following the principal of least suprise (a libary is not expected to write to the console which is the observable default behaviour of HTTPClient) and the principal of separation of concerns (logging is a concern for applications and not for libaries).
> Following at least one of these would substantially increase the joy of working with the HTTPClient libary.

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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org