You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Steve Johnson <sj...@mercury.com> on 2004/05/21 16:56:32 UTC

How to configure log4j.

Hi All,
 
Please help me initialize the log4j system properly.
 
I have attempted to create a properties file and use System properties.
Do I need to put the properties file in the jar in the same directory with the classes?
Is there a default properties file for httpclient?
 
log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient.methods.GetMethod).
log4j:WARN Please initialize the log4j system properly.
 
Help Cecil Help,
Steve
 
Steve Johnson
Software Engineer
Mercury Interactive
720 564 - 6532
USA, Canada and the Americas 
720 564-6620
Hours: M-F 08:00-17:00 MST (Mountain Standard Time) 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 <http://www.mercuryinteractive.com> http://www.mercuryinteractive.com
Looking for Answers to your SiteScope or SiteSeer questions?        <http://support.mercuryinteractive.com>
http://support.mercuryinteractive.com
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 
 

Re: How to configure log4j.

Posted by Oleg Kalnichevski <ol...@apache.org>.
Steve,
The best thing to do is to consult the 'Default Initialization
Procedure' section of the Log4J manual

http://logging.apache.org/log4j/docs/manual.html

Usually all it takes to have Log4J properly configured is to make sure
that log4j.properties file is in the class path. 

If still experiencing problems with Log4J configuration try setting the
following system property at the JVM startup

-Dlog4j.debug

This will prompt Log4J to output log4j-internal debugging information

Oleg


On Fri, 2004-05-21 at 16:56, Steve Johnson wrote:
> Hi All,
>  
> Please help me initialize the log4j system properly.
>  
> I have attempted to create a properties file and use System properties.
> Do I need to put the properties file in the jar in the same directory with the classes?
> Is there a default properties file for httpclient?
>  
> log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient.methods.GetMethod).
> log4j:WARN Please initialize the log4j system properly.
>  
> Help Cecil Help,
> Steve
>  
> Steve Johnson
> Software Engineer
> Mercury Interactive
> 720 564 - 6532
> USA, Canada and the Americas 
> 720 564-6620
> Hours: M-F 08:00-17:00 MST (Mountain Standard Time) 
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>  <http://www.mercuryinteractive.com> http://www.mercuryinteractive.com
> Looking for Answers to your SiteScope or SiteSeer questions?        <http://support.mercuryinteractive.com>
> http://support.mercuryinteractive.com
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>  
> 
> 


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


RE: How to configure log4j.

Posted by bagas <ba...@indoartha.co.id>.
Hi Steve,

I think you should add this line :

PropertyConfigurator.configure(System.getProperties());

In your code. 

Adding this code means you re-initialize the LOG4j.

But for any details you should look at the LOG4j site.

Hope this help.

Regards,

Rahmat Bagas Santoso

-----Original Message-----
From: Steve Johnson [mailto:sjohnson@mercury.com] 
Sent: Friday, May 21, 2004 9:57 PM
To: 'commons-httpclient-dev@jakarta.apache.org'
Subject: How to configure log4j.

Hi All,
 
Please help me initialize the log4j system properly.
 
I have attempted to create a properties file and use System properties.
Do I need to put the properties file in the jar in the same directory
with the classes?
Is there a default properties file for httpclient?
 
log4j:WARN No appenders could be found for logger
(org.apache.commons.httpclient.methods.GetMethod).
log4j:WARN Please initialize the log4j system properly.
 
Help Cecil Help,
Steve
 
Steve Johnson
Software Engineer
Mercury Interactive
720 564 - 6532
USA, Canada and the Americas 
720 564-6620
Hours: M-F 08:00-17:00 MST (Mountain Standard Time) 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 <http://www.mercuryinteractive.com> http://www.mercuryinteractive.com
Looking for Answers to your SiteScope or SiteSeer questions?
<http://support.mercuryinteractive.com>
http://support.mercuryinteractive.com
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 
 



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