You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Chien Wei Tan <Ch...@calytrix.com> on 2001/09/17 04:33:46 UTC
Need help with initialisation of log4j
Hi,
Sorry, if this problem has already been raised before, if so, could someone
direct me please?
I am trying to become familiar with using log4j, and I am stuck with the
initialisation algorithm (mentioned in the log4j manual).
Particulary, how do i use the "log4j.configuration" system property? (how to
use the default value log4j.properties - where is log4j.properties actually
located, and could i also use some other xxx.properties)
Could someone possibly provide a detailed step-by-step description for how
to use it?
cheers,
cw
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org
Re: Need help with initialisation of log4j
Posted by Paul Glezen <pg...@atdial.net>.
Chien Wei Tan wrote:
> Particulary, how do i use the "log4j.configuration" system property? (how to
> use the default value log4j.properties - where is log4j.properties actually
> located, and could i also use some other xxx.properties)
>
The log4j.properties should be somewhere in your classpath. If you want
to use a filename different from log4j.properties, define that value in
the log4j.configuration property.
- Paul
--
Beware of bugs in the above code. I have
only proved it correct, not tried it.
-Don Knuth
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org
RE: How to configure log4j with .properties file
Posted by Thomas Tuft Muller <tt...@online.no>.
Yes, the PropertyConfigurator is meant to read from a properties file-URL
(default is log4j.properties), whilst the DOMConfigurator reads from an XML
file (default log4j.xml).
Hope this helps
--
Thomas
| -----Original Message-----
| From: Chien Wei Tan [mailto:Chienwei.Tan@calytrix.com]
| Sent: 17 September 2001 05:12
| To: LOG4J Users Mailing List
| Subject: How to configure log4j with .properties file
|
|
|
| Hi,
|
| Instead of configuring log4j from a ".lcf" file, is it possible
| to configure
| using a ".properties" file?
|
|
| Cheers,
| cw
|
|
| ---------------------------------------------------------------------
| To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
| For additional commands, e-mail: log4j-user-help@jakarta.apache.org
|
|
*************************************************************************
Copyright ERA Technology Ltd. 2001. (www.era.co.uk). All rights reserved.
Confidential. No liability whatsoever is accepted for any loss or damage
suffered as a result of accessing this message or any attachments.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org
How to configure log4j with .properties file
Posted by Chien Wei Tan <Ch...@calytrix.com>.
Hi,
Instead of configuring log4j from a ".lcf" file, is it possible to configure
using a ".properties" file?
Cheers,
cw
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org