public abstract class LoggerFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.HashMap<java.lang.String,LogChannel> |
debugChannels
The debug channels mapped to the appropriate logger ids.
|
protected static java.lang.String |
debugLevel
The highest level to log debug errors at
|
protected java.util.HashMap<java.lang.String,LogChannel> |
logChannels
The log channels mapped to the appropriate logger ids.
|
protected static java.lang.String |
logLevel
The highest level to log messages at
|
protected static PropertiesParser |
propsParser
Logging properties
|
Constructor and Description |
---|
LoggerFactory() |
Modifier and Type | Method and Description |
---|---|
java.util.HashMap<java.lang.String,LogChannel> |
getAllDebugChannels()
Get all channels to write the debug messages to, as a list.
|
java.util.HashMap<java.lang.String,LogChannel> |
getAllLogChannels()
Get all channels to write the log messages to, as a list.
|
protected abstract java.util.ArrayList<LogChannel> |
getDebugChannels()
Get the list of debug channels.
|
static java.lang.String |
getDebugLevel()
Get the level to debug messages to.
|
static LoggerFactory |
getInstance()
Get the created instance of the logger factory.
|
protected abstract java.util.ArrayList<LogChannel> |
getLogChannels()
Get the list of log channels.
|
abstract Logger |
getLoggerInstance(java.lang.String loggerID)
Create a new instance of Logger.
|
static java.lang.String |
getLogLevel()
Get the level to log messages to.
|
void |
resetChannels()
Reset the channels by reading the properties file again and adding any new
standard ones, or updating the values of the existing ones.
|
static void |
setDebugLevel(java.lang.String theDebugLevel)
Set the level to debug messages to.
|
static void |
setLoggerFactory(LoggerFactory thisLoggerFactory)
Set the instance of the logger factory to be used.
|
static void |
setLogLevel(java.lang.String theLogLevel)
Set the level to log messages to.
|
protected static PropertiesParser propsParser
protected java.util.HashMap<java.lang.String,LogChannel> logChannels
protected java.util.HashMap<java.lang.String,LogChannel> debugChannels
protected static java.lang.String logLevel
protected static java.lang.String debugLevel
public static LoggerFactory getInstance()
public static void setLoggerFactory(LoggerFactory thisLoggerFactory)
thisLoggerFactory
- the logger factory to use.public abstract Logger getLoggerInstance(java.lang.String loggerID)
loggerID
- the id to identify one logger from another.protected abstract java.util.ArrayList<LogChannel> getLogChannels()
protected abstract java.util.ArrayList<LogChannel> getDebugChannels()
public void resetChannels() throws java.lang.Exception
java.lang.Exception
- any error.public java.util.HashMap<java.lang.String,LogChannel> getAllLogChannels()
public java.util.HashMap<java.lang.String,LogChannel> getAllDebugChannels()
public static void setLogLevel(java.lang.String theLogLevel)
theLogLevel
- the level to log messages to.public static java.lang.String getLogLevel()
public static void setDebugLevel(java.lang.String theDebugLevel)
theDebugLevel
- the level to debug messages to.public static java.lang.String getDebugLevel()