public abstract class Logger extends java.lang.Object implements RevisionHandler
| Modifier and Type | Class and Description |
|---|---|
static class |
Logger.Level
The logging level.
|
| Modifier and Type | Field and Description |
|---|---|
protected static java.text.SimpleDateFormat |
m_DateFormat
for formatting the dates.
|
protected Logger.Level |
m_MinLevel
the minimum level of log events to have in order to end up in the log.
|
protected static java.util.Properties |
m_Properties
the properties file.
|
protected static Logger |
m_Singleton
the singleton instance of the logger.
|
static java.lang.String |
PROPERTIES_FILE
the properties file.
|
| Constructor and Description |
|---|
Logger()
Initializes the logger.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
doLog(Logger.Level level,
java.lang.String msg,
java.lang.String cls,
java.lang.String method,
int lineno)
Performs the actual logging.
|
protected static java.lang.String[] |
getLocation()
Returns the location the logging happened.
|
Logger.Level |
getMinLevel()
Returns the minimum level log messages must have in order to appear in the
log.
|
static Logger |
getSingleton()
Returns the singleton instance of the logger.
|
protected void |
initialize()
Initializes the logger.
|
static void |
log(Logger.Level level,
java.lang.String msg)
Logs the given message under the given level.
|
static void |
log(Logger.Level level,
java.lang.Throwable t)
Logs the given message under the given level.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRevisionpublic static final java.lang.String PROPERTIES_FILE
protected static Logger m_Singleton
protected static java.util.Properties m_Properties
protected static java.text.SimpleDateFormat m_DateFormat
protected Logger.Level m_MinLevel
protected static java.lang.String[] getLocation()
public static Logger getSingleton()
public static void log(Logger.Level level, java.lang.String msg)
level - the level of the messagemsg - the message to logpublic static void log(Logger.Level level, java.lang.Throwable t)
level - the level of the messaget - the throwable to logprotected void initialize()
public Logger.Level getMinLevel()
protected abstract void doLog(Logger.Level level, java.lang.String msg, java.lang.String cls, java.lang.String method, int lineno)
level - the level of the messagemsg - the message to logcls - the classname originating the log eventmethod - the method originating the log eventlineno - the line number originating the log event