|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--irssibot.util.log.Log
Logging system for IrssiBot.
| Field Summary | |
static int |
DEBUG_HIGH
|
static int |
DEBUG_LOW
|
static int |
DEBUG_NORMAL
|
static int |
DEBUG_OFF
|
private static int |
debugLevel
Current debug level |
private static CommonLog |
logger
Current logger |
private static java.text.SimpleDateFormat |
sdf
Date formatter for log messages |
| Constructor Summary | |
private |
Log()
Disallow instantiating this class |
| Method Summary | |
static void |
debug(java.lang.Object obj,
java.lang.String message)
Prints a debug message to log with default debug level. |
static void |
debug(java.lang.Object obj,
java.lang.String message,
int level)
Prints a debug message via current logger with given debug level. |
static void |
error(java.lang.Object obj,
java.lang.String message)
Prints an error message to log. |
static java.lang.String |
getDateFormatString()
Returns the current date format string. |
static int |
getDebugLevel()
Returns the current debug level. |
static CommonLog |
getLogger()
Returns the current logger. |
static void |
info(java.lang.Object obj,
java.lang.String message)
Prints an info message to log. |
static void |
init(CommonLog logger,
java.lang.String dateFormatString)
Initializes logging system with a given logger. |
static void |
log(java.lang.Object obj,
java.lang.Throwable t)
Prints an error description to the log based on a Throwable causing the error. |
private static void |
logMessage(java.lang.Object obj,
java.lang.String prefix,
java.lang.String message)
Prints a logging message via current logger. |
static void |
server(java.lang.String message)
Prints a server message to log. |
static int |
setDebugLevel(int level)
Sets the debug level. |
static void |
stop()
Stops the current logger and deinits logging. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static int DEBUG_LOW
public static int DEBUG_NORMAL
public static int DEBUG_HIGH
public static int DEBUG_OFF
private static int debugLevel
private static java.text.SimpleDateFormat sdf
private static CommonLog logger
| Constructor Detail |
private Log()
| Method Detail |
public static void init(CommonLog logger,
java.lang.String dateFormatString)
logger - logger object to usepublic static CommonLog getLogger()
public static java.lang.String getDateFormatString()
public static void stop()
public static int setDebugLevel(int level)
level - new debug level
java.lang.IllegalArgumentException - if level is out
of rangepublic static int getDebugLevel()
private static void logMessage(java.lang.Object obj,
java.lang.String prefix,
java.lang.String message)
obj - the source of this log messageprefix - log message prefixmessage - log message
public static void debug(java.lang.Object obj,
java.lang.String message,
int level)
obj - the source of this log messagemessage - log messagelevel - log level to use
java.lang.IllegalArgumentException - if level is out
of range
public static void debug(java.lang.Object obj,
java.lang.String message)
obj - the source of this log messagemessage - log message
public static void info(java.lang.Object obj,
java.lang.String message)
obj - the source of this log messagemessage - log message
public static void error(java.lang.Object obj,
java.lang.String message)
obj - the source of this log messagemessage - log messagepublic static void server(java.lang.String message)
message - log message
public static void log(java.lang.Object obj,
java.lang.Throwable t)
obj - the source of this log messaget - the Throwable causing the error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||