|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.northwestern.at.wordhoard.server.Logger
public class Logger
Server log manager.
This static class is a simple wrapper around a Jakarta Commons Logging log4j logger named "edu.northwestern.at.wordhoard.server".
The file named "log.config" in the server directory is used to configure the logger.
Field Summary | |
---|---|
static int |
DEBUG
Debug logging level. |
static int |
ERROR
Error logging level. |
static int |
FATAL
Fatal logging level. |
static int |
INFO
Info logging level. |
static int |
WARN
Warn logging level. |
Method Summary | |
---|---|
(package private) static void |
initialize()
Initializes the logger. |
(package private) static void |
initialize(java.lang.String message)
Initializes the logger. |
(package private) static void |
log(int level,
java.lang.String str)
Logs a message. |
(package private) static void |
log(int level,
java.lang.String str,
java.lang.Throwable t)
Logs an error message with a stack trace. |
(package private) static void |
log(WordHoardSessionImpl session,
int level,
java.lang.String str)
Logs a message for a session. |
(package private) static void |
log(WordHoardSessionImpl session,
int level,
java.lang.String str,
java.lang.Throwable t)
Logs an error message for a session with a stack trace. |
(package private) static org.apache.log4j.Priority |
mapLevel(int level)
Maps a LoggerConstants level to a log4j level. |
(package private) static void |
terminate()
Terminates the logger. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int FATAL
public static final int ERROR
public static final int WARN
public static final int INFO
public static final int DEBUG
Method Detail |
---|
static void initialize(java.lang.String message) throws java.io.FileNotFoundException, java.io.IOException
message
- Initial log message.
Reads the "log.config" configuraton file and configures the server logger.
The configuration file is preprocessed to force the log file to be located in the server directory. The server directory path is prepended to the log file name.
java.lang.Exception
java.io.FileNotFoundException
java.io.IOException
static void initialize() throws java.io.FileNotFoundException, java.io.IOException
Reads the "log.config" configuraton file and configures the server logger.
The configuration file is preprocessed to force the log file to be located in the server directory. The server directory path is prepended to the log file name.
java.lang.Exception
java.io.FileNotFoundException
java.io.IOException
static void terminate()
static org.apache.log4j.Priority mapLevel(int level)
level
- LoggerConstants level.
static void log(int level, java.lang.String str)
level
- Log message level.str
- Log message. static void log(WordHoardSessionImpl session, int level, java.lang.String str)
session
- The session.level
- Log message level.str
- Log message. static void log(int level, java.lang.String str, java.lang.Throwable t)
level
- Log message level.str
- Log message.t
- Throwable. static void log(WordHoardSessionImpl session, int level, java.lang.String str, java.lang.Throwable t)
session
- The session.level
- Log message level.str
- Log message.t
- Throwable.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |