You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Frank Herrfurt <Fr...@bwb.org> on 2004/05/24 12:09:36 UTC
[httpclient] setting the log level doesn't work in some situations
Hi all,
we have a problem with using the httpclient package, which is using the
logging package.
We have a portal server where we use a portlet and utilize the commons
httpclient for retrieving content from other servers for display within the
portlet.
It seems, that the logging level of the httpclient is set to warning by
default, but in our production system we want to set a lower level (error).
Within a pure java program the setting of the loglevel works fine, e.g.:
System.setProperty
("org.apache.commons.logging.simplelog.log.httpclient.wire", "error");
System.setProperty
("org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient",
"error");
Within the portlet these setting doesn't work, so we have no possibility to
set any other loglevel at all, but which is pretty important.
There are cases, where we want be dynamic on setting the log level via the
code by passing parameters.
Also setting the properties as JVM arguments doesn't work neither for the
whole system.
Any suggestions?
Thanks for your help in advance
Frank
Mit freundlichen Grüßen / Best Regards
Frank Herrfurt
--
Consultant, Diplom-Betriebswirt (BA), Schwerpunkt WI
Bundeswehr IT-Amt VDV C1 (Strausberg)
Tel: intern: 8221 2072, extern: 03341/58-2072
Mobil: 0171/8627697
E-Mail: FrankHerrfurt@bwb.org (Frank
Herrfurt/Partner/BWB/Rüstung/BMVg/DE@BWB)
Re: [httpclient] setting the log level doesn't work in some situations
Posted by José Antonio Pérez Testa <ja...@indra.es>.
Hi Frank,
Commons Logging has a process for finding the actual implementation to use.
If there is log4j available (and in most of the appservers is), CL uses
it. So setting properties for SimpleLog
implementation will have no effect at all.
Look for log4j.jar and for log4j.properties and try configuring log
levels there.
Regards,
Tono
Frank Herrfurt wrote:
>Hi all,
>
>we have a problem with using the httpclient package, which is using the
>logging package.
>
>We have a portal server where we use a portlet and utilize the commons
>httpclient for retrieving content from other servers for display within the
>portlet.
>
>It seems, that the logging level of the httpclient is set to warning by
>default, but in our production system we want to set a lower level (error).
>
>Within a pure java program the setting of the loglevel works fine, e.g.:
>System.setProperty
>("org.apache.commons.logging.simplelog.log.httpclient.wire", "error");
>System.setProperty
>("org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient",
>"error");
>
>Within the portlet these setting doesn't work, so we have no possibility to
>set any other loglevel at all, but which is pretty important.
>There are cases, where we want be dynamic on setting the log level via the
>code by passing parameters.
>Also setting the properties as JVM arguments doesn't work neither for the
>whole system.
>
>
>Any suggestions?
>
>Thanks for your help in advance
>Frank
>
>
>
>
>Mit freundlichen Grüßen / Best Regards
>Frank Herrfurt
>
>--
>Consultant, Diplom-Betriebswirt (BA), Schwerpunkt WI
>Bundeswehr IT-Amt VDV C1 (Strausberg)
>Tel: intern: 8221 2072, extern: 03341/58-2072
>Mobil: 0171/8627697
>E-Mail: FrankHerrfurt@bwb.org (Frank
>Herrfurt/Partner/BWB/Rüstung/BMVg/DE@BWB)
>
>
-------------------------------------------------------------------------------------------------------------------
Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, contiene información de carácter confidencial exclusivamente dirigida a su destinatario o destinatarios. Queda prohibida su divulgación, copia o distribución a terceros sin la previa autorización escrita de Indra. En el caso de haber recibido este correo electrónico por error, se ruega notificar inmediatamente esta circunstancia mediante reenvío a la dirección electrónica del remitente.
The information in this e-mail and in any attachments is confidential and solely for the attention and use of the named addressee(s). You are hereby notified that any dissemination, distribution or copy of this communication is prohibited without the prior written consent of Indra. If you have received this communication in error, please, notify the sender by reply e-mail
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [httpclient] setting the log level doesn't work in some situations
Posted by Michael Becke <be...@u.washington.edu>.
Hello Frank,
It sounds like you might want to use a more robust logging package,
log4j or java.util.logging perhaps. commons-logging (the package that
HttpClient uses) is meant to provide a generic API for logging that
acts as a facade for other APIs. Please have a look at the
commons-logging <http://jakarta.apache.org/commons/logging/> and log4j
<http://logging.apache.org/log4j/docs/> sites for more info.
Mike
On May 24, 2004, at 6:09 AM, Frank Herrfurt wrote:
> Hi all,
>
> we have a problem with using the httpclient package, which is using the
> logging package.
>
> We have a portal server where we use a portlet and utilize the commons
> httpclient for retrieving content from other servers for display
> within the
> portlet.
>
> It seems, that the logging level of the httpclient is set to warning by
> default, but in our production system we want to set a lower level
> (error).
>
> Within a pure java program the setting of the loglevel works fine,
> e.g.:
> System.setProperty
> ("org.apache.commons.logging.simplelog.log.httpclient.wire", "error");
> System.setProperty
> ("org.apache.commons.logging.simplelog.log.org.apache.commons.httpclien
> t",
> "error");
>
> Within the portlet these setting doesn't work, so we have no
> possibility to
> set any other loglevel at all, but which is pretty important.
> There are cases, where we want be dynamic on setting the log level via
> the
> code by passing parameters.
> Also setting the properties as JVM arguments doesn't work neither for
> the
> whole system.
>
>
> Any suggestions?
>
> Thanks for your help in advance
> Frank
>
>
>
>
> Mit freundlichen Grüßen / Best Regards
> Frank Herrfurt
>
> --
> Consultant, Diplom-Betriebswirt (BA), Schwerpunkt WI
> Bundeswehr IT-Amt VDV C1 (Strausberg)
> Tel: intern: 8221 2072, extern: 03341/58-2072
> Mobil: 0171/8627697
> E-Mail: FrankHerrfurt@bwb.org (Frank
> Herrfurt/Partner/BWB/Rüstung/BMVg/DE@BWB)
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org