com.interface21.util
Class Log4jConfigurer
java.lang.Object
|
+--com.interface21.util.Log4jConfigurer
- public abstract class Log4jConfigurer
- extends java.lang.Object
Convenience class that features simple methods for custom Log4J configuration.
- Since:
- 13.03.2003
- Author:
- Juergen Hoeller
- See Also:
Log4jConfigListener
|
Method Summary |
static void |
initLogging(java.lang.String location)
Initialize Log4J with the given configuration and the default refresh interval. |
static void |
initLogging(java.lang.String location,
long refreshInterval)
Initialize Log4J with the given configuration.
|
static void |
setWorkingDirSystemProperty(java.lang.String key)
Set the specified system property to the current working directory.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_REFRESH_INTERVAL
public static final long DEFAULT_REFRESH_INTERVAL
XML_FILE_EXTENSION
public static final java.lang.String XML_FILE_EXTENSION
Log4jConfigurer
public Log4jConfigurer()
initLogging
public static void initLogging(java.lang.String location,
long refreshInterval)
throws java.io.FileNotFoundException
- Initialize Log4J with the given configuration.
Assumes an XML file in case of a ".xml" file extension.
- Parameters:
location - location of the config filerefreshInterval - interval between config file refresh checks- Throws:
java.io.FileNotFoundException - if the location specifies an invalid file path
initLogging
public static void initLogging(java.lang.String location)
throws java.io.FileNotFoundException
- Initialize Log4J with the given configuration and the default refresh interval.
- Parameters:
location - location of the property config file- Throws:
java.io.FileNotFoundException - if the location specifies an invalid file path
setWorkingDirSystemProperty
public static void setWorkingDirSystemProperty(java.lang.String key)
- Set the specified system property to the current working directory.
This can be used e.g. for test environments, for applications that leverage
Log4jConfigListener's "webAppRootKey" support in a web environment.
- Parameters:
key - system property key to use- See Also:
Log4jConfigListener
Rod Johnson and Spring contributors 2001-2003.