config files
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, December 3, 2002 11:39 AM


Does anyone have any idea where to get documentation on the properties that can be set? Like Conversion Patterns? Or the DTD for the XML properties? Also, where does log4j want the configuration file to live? All the docs seem to be on the Java code and not the configuration files. I haven't used this version of log4j. The docs seem less complete.

thanks


Zoa Buske

Re: config files

Posted By:   lucas_bruand  
Posted On:   Tuesday, December 3, 2002 01:15 PM

>Does anyone have any idea where to get documentation on the properties that can be set?


Well, when log4j is loading a properties configfile or an XML configfile, it does simply map the "instructions"
( be they XML or properties) to corresponding calls of setters and getters methods...
The best way to learn this is to use examples in the beginning:
Here is a simple example of configuration with the properties


For XML, here is a simple example






> Or the DTD for the XML properties?

There is
a dtd inside the distributed Jar file



>Also, where does log4j want the configuration file to live?

Basically, the idea is: You define it...

You need to use the following command in the beginning of your application in order to load the configuration file:
DOMConfigurator.configureAndWatch("filename"); - That's for XML configuration file... Use BasicConfigurator otherwise...
You can also manually load the property file in the "java" shell command execution.
About | Sitemap | Contact