commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shah, Shrihas \(OFT\)" <Shrihas.S...@oft.state.ny.us>
Subject RE: configuring Logging
Date Wed, 02 Jun 2004 17:06:07 GMT
Hi Ashish:

Here you go
Static
{
	    URL url =
LoggedUser.class.getClassLoader().getResource("/us/ny/state/oft/da/resou
rces/log4j.properties");
    	PropertyConfigurator.configure(url);
}

Just put this in one of the class which is a starter class.

Shrihas 

Shrihas Shah
NYS Office for Technology
shrihas.shah@oft.state.ny.us
Phone (518) 473-5023
Fax (518) 473-3389
(US Postal Service Regular Mail Address)
State Capitol ESP, PO Box 2062
Albany, NY 12220-0062
(Parcel Post/Overnight and Interagency Mail Address)
Empire State Plaza
Swan St., Core 4, 1st Floor
Albany, NY 12223
 
-----Original Message-----
From: Ashish Naik [mailto:ashishn@mahindrabt.com] 
Sent: Wednesday, June 02, 2004 11:48 AM
To: Commons-User
Subject: configuring Logging


I am not able to understand how to confifigure Log4J for Commons logging
API.

I have added log4j.jar to my classpath. How do I set
log4j.configuration=log4j.properties

I am refering to Logging User Guide at
http://jakarta.apache.org/commons/logging/guide.html


Cheers,
Ashish Naik


*********************************************************
Disclaimer:          

This message (including any attachments) contains 
confidential information intended for a specific 
individual and purpose, and is protected by law. 
If you are not the intended recipient, you should 
delete this message and are hereby notified that 
any disclosure, copying, or distribution of this
message, or the taking of any action based on it, 
is strictly prohibited.

*********************************************************
Visit us at http://www.mahindrabt.com

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


Mime
View raw message