Thank you all for your responses.
I have to agree with Ryan that the the logging library introduces some complexity for
users who need to use the HttpClient for very simple stuff.
I also have to disagree with Ortwin that questions about logging configuration is out
of scope, since the only reason I'm interested in logging is the HttpClient.
Anyway, since, the documentation about the logging configuration wasn't quite detailed
and the commons loggin project doesn't contain
any documentation other than the javadocs, I still need to make sure that what I
understood here is correct.
Supposedly, the following statements will guarantee that the logging is only
restricted to the System.out and that it will be on the error level. Please correct me
if anything is wrong.
System.setProperty("org.apache.commons.logging.Log",
"org.apache.commons.logging.impl.SimpleLog");
System.setProperty("org.apache.commons.logging.simplelog.showdatetime", "true");
System.setProperty("org.apache.commons.logging.simplelog.defaultlog", "error");
Thanks again for your help.
Tarek Nabil
-----Original Message-----
From: Ortwin Gl�ck [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 10:30 PM
To: Commons HttpClient Project
Subject: Re: Am I in the right place?
Tarek M. Nabil wrote:
> So, I guess now, my question should be, will HttpClient generate log
> files?
Actually the log files are generated by the log implementation. This can
be Log4J or something else. HttpClient itself does not write any files.
Questions about Commons Logging configuration do not belong here.
> And when? And how do I configure the logging, maybe to prevent
> it completely? Is that doable?
See package summary of Commons-Logging:
http://jakarta.apache.org/commons/logging/api/org/apache/commons/logging/package-summary.html
You can turn off logging completely by simply setting a System property:
org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
But it's cleaner to make a commons-logging.properties file and set this
there.
Odi
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]