public abstract class LogFactory extends Object implements IBase
Abstract LogFactory class.
| Modifier and Type | Field and Description |
|---|---|
protected Log.LEVEL |
level |
protected LevelMapper |
levelMapper |
| Constructor and Description |
|---|
LogFactory() |
| Modifier and Type | Method and Description |
|---|---|
abstract LogEngine |
createInstance(String name)
Construct and return a
Log instance,
using the factory's current set of configuration attributes. |
Log.LEVEL |
getDefaultLevel() |
LogEngine |
getInstance(Class<?> clazz)
Convenience method to derive a name from the specified class and
call
getInstance(String) with it. |
LogEngine |
getInstance(String name)
Construct (if necessary) and return a
Log instance,
using the factory's current set of configuration attributes. |
LevelMapper |
getLevelMapper()
getDefaultLevel.
|
LogEngine |
getLog(Class<?> class1) |
ParameterMapper |
getParameterMapper() |
void |
init() |
abstract void |
init(ResourceNode config) |
void |
setDefaultLevel(Log.LEVEL level) |
void |
setLevelMapper(LevelMapper levelMapper) |
void |
setParameterMapper(ParameterMapper parameterMapper) |
protected Log.LEVEL level
protected LevelMapper levelMapper
public LogEngine getInstance(Class<?> clazz)
getInstance(String) with it.clazz - Class for which a suitable Log name will be derivedLogEngine object.public abstract void init(ResourceNode config) throws Exception
Exceptionpublic LogEngine getInstance(String name)
Construct (if necessary) and return a Log instance,
using the factory's current set of configuration attributes.
NOTE - Depending upon the implementation of
the LogFactory you are using, the Log
instance you are returned may or may not be local to the current
application, and may or may not be returned again on a subsequent
call with the same name argument.
name - Logical name of the Log instance to be
returned (the meaning of this name is only known to the underlying
logging implementation that is being wrapped)LogEngine object.public abstract LogEngine createInstance(String name)
Construct and return a Log instance,
using the factory's current set of configuration attributes.
NOTE - Depending upon the implementation of
the LogFactory you are using, the Log
instance you are returned may or may not be local to the current
application, and may or may not be returned again on a subsequent
call with the same name argument.
name - Logical name of the Log instance to be
returned (the meaning of this name is only known to the underlying
logging implementation that is being wrapped)LogEngine object.public void setDefaultLevel(Log.LEVEL level)
public Log.LEVEL getDefaultLevel()
public LevelMapper getLevelMapper()
getDefaultLevel.
Log.LEVEL object.public void setLevelMapper(LevelMapper levelMapper)
public ParameterMapper getParameterMapper()
public void setParameterMapper(ParameterMapper parameterMapper)
Copyright © 2016. All Rights Reserved.