monrovia.tools
Class Logger
java.lang.Object
|
+--monrovia.tools.Logger
- public class Logger
- extends java.lang.Object
The servers logger
Constructor Summary |
Logger(java.io.OutputStream pOut,
int pLogLevel)
the constructor initializes the logger to log to the given outputstream |
Logger(java.io.OutputStream pOut,
int pLogLevel,
int pOutLevel)
the constructor initializes the logger to log to the given outputstream |
Logger(java.lang.String pFileName,
int pLogLevel)
the constructor opens the file for logging |
Method Summary |
void |
close()
close closes the loggers outputstream |
static void |
log(java.lang.String pMessage)
log logs the the message with LOG_LEVEL_NORMAL |
static void |
log(java.lang.String pMessage,
int pLogLevel)
log logs the message with the given loglevel |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG_LEVEL_ALL
public static final int LOG_LEVEL_ALL
LOG_LEVEL_DEBUG
public static final int LOG_LEVEL_DEBUG
LOG_LEVEL_VERBOSE
public static final int LOG_LEVEL_VERBOSE
LOG_LEVEL_NORMAL
public static final int LOG_LEVEL_NORMAL
LOG_LEVEL_SILENT
public static final int LOG_LEVEL_SILENT
LOG_LEVEL_NONE
public static final int LOG_LEVEL_NONE
Logger
public Logger(java.lang.String pFileName,
int pLogLevel)
- the constructor opens the file for logging
- Parameters:
pFileName
- the filename to log topLogLevel
- the servers loglevel
, if messages are below this they are not logged
Logger
public Logger(java.io.OutputStream pOut,
int pLogLevel)
- the constructor initializes the logger to log to the given outputstream
- Parameters:
pOut
- the outputstreampLogLevel
- the log level
Logger
public Logger(java.io.OutputStream pOut,
int pLogLevel,
int pOutLevel)
- the constructor initializes the logger to log to the given outputstream
- Parameters:
pOut
- the outputstreampLogLevel
- the log levelpOutLEvel
- the out level
log
public static void log(java.lang.String pMessage)
- log logs the the message with LOG_LEVEL_NORMAL
- Parameters:
pMessage
- the message
log
public static void log(java.lang.String pMessage,
int pLogLevel)
- log logs the message with the given loglevel
- Parameters:
pMessage
- the messagepLogLevel
- the loglevel of this message
close
public void close()
- close closes the loggers outputstream