rheise.jftpd
Class Logger
java.lang.Object
|
+--rheise.jftpd.Logger
- public class Logger
- extends java.lang.Object
This class provides a logging facility. Each message is logged with a
priority allowing the log to be configured to filter out log messages that
are below a certain priority.
Constructor Summary |
private |
Logger()
This class can't be instanciated. |
Method Summary |
static void |
log(int priority,
java.lang.String message)
Logs a message to the log with the specified priority. |
static void |
setPriority(int priority)
|
static void |
setWriter(java.io.PrintWriter writer)
|
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
LOG_EMERG
public static final int LOG_EMERG
LOG_ALERT
public static final int LOG_ALERT
LOG_CRIT
public static final int LOG_CRIT
LOG_ERR
public static final int LOG_ERR
LOG_WARNING
public static final int LOG_WARNING
LOG_NOTICE
public static final int LOG_NOTICE
LOG_INFO
public static final int LOG_INFO
LOG_DEBUG
public static final int LOG_DEBUG
LOG_OFF
public static final int LOG_OFF
priorityNames
public static final java.lang.String[] priorityNames
- An array of priority names.
writer
private static java.io.PrintWriter writer
- The Writer that logs will be written to.
priority
private static int priority
- Log entries above this priority will be logged. Note that lower
priority numbers represent higher priorities. Initially this value
is set to LOG_OFF.
Logger
private Logger()
- This class can't be instanciated.
setWriter
public static void setWriter(java.io.PrintWriter writer)
setPriority
public static void setPriority(int priority)
log
public static void log(int priority,
java.lang.String message)
- Logs a message to the log with the specified priority.
- Parameters:
priority
- the priority of this log message.message
- a message string that does not end with a new line.