Package edu.isi.pegasus.common.logging
Class LogManagerFactory
- java.lang.Object
-
- edu.isi.pegasus.common.logging.LogManagerFactory
-
public class LogManagerFactory extends java.lang.Object
A factory class to load the appropriate implementation of Logger API as specified by properties.- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_PACKAGE_NAME
The default package where all the implementations reside.private static LogManager
mSingletonInstance
Holds a singleton instance that is populated via the loadSingletonInstance() method.
-
Constructor Summary
Constructors Constructor Description LogManagerFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LogManager
loadInstance(PegasusProperties properties)
Loads the appropriate LogManager class as specified by properties.static LogManager
loadInstance(java.lang.String implementor, java.lang.String formatImplementor, java.util.Properties properties)
Loads the Log Formatter specified.static LogManager
loadSingletonInstance()
Loads the appropriate LogManager class as specified by properties.static LogManager
loadSingletonInstance(PegasusProperties properties)
Loads the appropriate LogManager class as specified by properties.
-
-
-
Field Detail
-
DEFAULT_PACKAGE_NAME
public static final java.lang.String DEFAULT_PACKAGE_NAME
The default package where all the implementations reside.- See Also:
- Constant Field Values
-
mSingletonInstance
private static LogManager mSingletonInstance
Holds a singleton instance that is populated via the loadSingletonInstance() method.
-
-
Method Detail
-
loadSingletonInstance
public static LogManager loadSingletonInstance() throws LogManagerFactoryException
Loads the appropriate LogManager class as specified by properties.- Returns:
- handle to the Log Formatter.
- Throws:
LogManagerFactoryException
- that nests any error that might occur during the instantiation- See Also:
DEFAULT_PACKAGE_NAME
-
loadSingletonInstance
public static LogManager loadSingletonInstance(PegasusProperties properties) throws LogManagerFactoryException
Loads the appropriate LogManager class as specified by properties.- Parameters:
properties
- is an instance of properties to use.- Returns:
- handle to the Log Formatter.
- Throws:
LogManagerFactoryException
- that nests any error that might occur during the instantiation- See Also:
DEFAULT_PACKAGE_NAME
-
loadInstance
public static LogManager loadInstance(PegasusProperties properties) throws LogManagerFactoryException
Loads the appropriate LogManager class as specified by properties.- Parameters:
properties
- is an instance of properties to use.- Returns:
- handle to the Log Manager.
- Throws:
LogManagerFactoryException
- that nests any error that might occur during the instantiation- See Also:
DEFAULT_PACKAGE_NAME
-
loadInstance
public static LogManager loadInstance(java.lang.String implementor, java.lang.String formatImplementor, java.util.Properties properties) throws LogManagerFactoryException
Loads the Log Formatter specified.- Parameters:
implementor
- the name of the class implementing LogManagerformatImplementor
- the name of the class implementing the formatting techniqueproperties
- properties- Returns:
- handle to the LogManager
- Throws:
LogManagerFactoryException
- that nests any error that might occur during the instantiation- See Also:
DEFAULT_PACKAGE_NAME
-
-