logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: log4j.properties in a jar file
Date Mon, 17 Nov 2003 15:26:22 GMT

Howdy,
You mean for auto-configuration of log4j?

In general, if you put a resource in a jar file it's accessible to the
ClassLoader#getResource call, which is what log4j uses to auto-configure
itself.  You have to make sure the log4j.properties file is at the top
level of the jar, so getResource("/log4j.properties") will work.  

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Sahraei Sasan-ssahra01 [mailto:sasan.sahraei@motorola.com]
>Sent: Monday, November 17, 2003 10:18 AM
>To: 'Log4J Users List'
>Subject: RE: log4j.properties in a jar file
>
>:) thanks :), the question was, is it possible though to include the
>properties file into a jar file, will be accessble then by log4j
loaders
>(those classes that are required to read it)?
>
>-----Original Message-----
>From: Shapira, Yoav [mailto:Yoav.Shapira@mpi.com]
>Sent: 17 November 2003 15:14
>To: Log4J Users List
>Subject: RE: log4j.properties in a jar file
>
>
>
>Howdy,
>By doing jar cvf [jarFileName] log2j.properties ;)  It's not difficult.
>
>Yoav Shapira
>Millennium ChemInformatics
>
>
>>-----Original Message-----
>>From: Sahraei Sasan-ssahra01 [mailto:sasan.sahraei@motorola.com]
>>Sent: Monday, November 17, 2003 10:04 AM
>>To: 'Log4J Users List'
>>Subject: log4j.properties in a jar file
>>
>>Hi,
>>
>>How is it possible to put log2j.properties in a jar file?
>>
>>Thanks,
>>Sasan
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>
>
>
>
>This e-mail, including any attachments, is a confidential business
>communication, and may contain information that is confidential,
>proprietary and/or privileged.  This e-mail is intended only for the
>individual(s) to whom it is addressed, and may not be saved, copied,
>printed, disclosed or used by anyone else.  If you are not the(an)
intended
>recipient, please immediately delete this e-mail from your computer
system
>and notify the sender.  Thank you.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org




This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


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


Mime
View raw message