|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.LexGrid.util.config.Log4JUtility
public class Log4JUtility
Class to aid in configuring log4j
Constructor Summary | |
---|---|
Log4JUtility()
|
Method Summary | |
---|---|
static void |
configureLog4j(java.util.Properties props)
Configure log4j from a properties object. |
static void |
configureLog4j(java.util.Properties props,
java.lang.String baseLogOutputDirectory)
Configure log4j from a properties object. |
static void |
configureLog4j(java.lang.String log4JConfigFile)
Configure log4j from a config file. |
static void |
configureLog4j(java.lang.String log4JConfigFile,
java.lang.String baseLogOutputDirectory)
Method to read in a log4j config file, modify every property that ends with "File" such that the baseFilePath value is prefixed onto it, and then configure log4j with the results. |
static void |
configureLog4JFromPathSpecifiedInProperties(java.util.Properties properties,
java.lang.String log4JConfigFilePropertyName,
boolean setLogOutputBaseDirToPropertiesPath)
Configure log4j with the a config file specified by a value in a properties object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Log4JUtility()
Method Detail |
---|
public static void configureLog4JFromPathSpecifiedInProperties(java.util.Properties properties, java.lang.String log4JConfigFilePropertyName, boolean setLogOutputBaseDirToPropertiesPath) throws java.lang.Exception
properties
- The properties object to look in for the file name of the
log4j config file.log4JConfigFilePropertyName
- The property name in the properties object that has a
corresponding value with the path of the log4j config file.setLogOutputBaseDirToPropertiesPath
- Should the log4j config file be modifed so that all appenders
that end with "File" have the base directory of the location
of the properties file prepended to them? If true - this also
requires having the 'propertiesFileParentFolder' value set.
java.lang.Exception
public static void configureLog4j(java.lang.String log4JConfigFile, java.lang.String baseLogOutputDirectory) throws java.io.IOException
log4JConfigFile
- The file (or URL) to read the log4j configuration frombaseFilePath
- The path to prefix onto all values that end with "File" in the
log4j config file.
java.io.IOException
public static void configureLog4j(java.lang.String log4JConfigFile) throws java.io.IOException
log4JConfigFile
- File (or URL) to use to configure log4j.
java.io.IOException
public static void configureLog4j(java.util.Properties props)
props
- The log4j propertiespublic static void configureLog4j(java.util.Properties props, java.lang.String baseLogOutputDirectory)
props
- properties to load.baseLogOutputDirectory
- directory path to prefix onto items ending with "File"
|
Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |