All this is explicitly in the docs. You may want to start by taking a look there B4 posting questions. The docs for this project are very good. http://jakarta.apache.org/log4j/docs/documentation.html
Below is the snippet from the docs describing log4j initialization: The exact default initialization algorithm is defined as follows: Setting the log4j.defaultInitOverride system property to any other value then "false" will cause log4j to skip the default initialization procedure (this procedure). Set the resource string variable to the value of the log4j.configuration system property. The preferred way to specify the default initialization file is thourough the log4j.configuration system property. In case the system property log4j.configuration is not defined, then set the string variable resource to its default value "log4j.properties". Attempt to convert the resource variable to a URL. If the resource variable cannot be converted to a URL, for example due to a MalformedURLException, then search for the resource from the classpath by calling org.apache.log4j.helpers.Loader.getResource(resource, Logger.class) which returns a URL. Note that the string "log4j.properties" constitutes a malformed URL. See Loader.getResource(java.lang.String) for the list of searched locations. If no URL could not be found, abort default initialization. Otherwise, configure log4j from the URL. The PropertyConfigurator will be used to parse the URL to configure log4j unless the URL ends with the ".xml" extension, in which case the DOMConfigurator will be used. You can optionaly specify a custom configurator. The value of the log4j.configuratorClass system property is taken as the fully qualified class name of your custom configurator. The custom configurator you specify must implement the Configurator interface. |-----Original Message----- |From: John C. Turnbull [mailto:[EMAIL PROTECTED]] |Sent: Tuesday, September 03, 2002 1:45 AM |To: Log4J Users List |Subject: Re: Where does it look for configuration files? | | |----- Original Message ----- |From: "John C. Turnbull" <[EMAIL PROTECTED]> |To: <[EMAIL PROTECTED]> |Sent: Tuesday, September 03, 2002 5:04 AM |Subject: Where does it look for configuration files? | | |> When I use DOMConfigurator.configure(<filename>), what |rules does it |follow |> to look for <filename>? | |Specifically I would like to know where it looks for the |file when only a |file name (and not a full path) is specified like |"john.txt" instead of |"C:\john.txt". | |-JT | | |-- |To unsubscribe, e-mail: |<mailto:[EMAIL PROTECTED]> |For additional commands, e-mail: |<mailto:[EMAIL PROTECTED]> | -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>