|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.systinet.logging.Category
This class provides methods for logging. For retrieving an instance of
the Category use the method getCategory(String)
.
Field Summary | |
static int |
DEBUG
The DEBUG level designates fine-grained informational events
that are most useful to debug an application. |
static int |
ERROR
The ERROR level designates error events that
might still allow the application to continue running. |
static int |
INFO
The INFO level designates informational messages
that highlight the progress of the application at coarse-grained
level. |
static int |
NONE
The NONE level is intended to turn off logging. |
static int |
WARN
The WARN level designates potentially harmful situations. |
Method Summary | |
void |
assertLog(boolean assertion,
java.lang.String msg)
If assertion parameter is false , then
logs msg as an error statement. |
void |
debug(java.lang.Object message)
Log an object with debug priority. |
void |
debug(java.lang.String message)
Log a message with debug priority. |
void |
debug(java.lang.String message,
java.lang.Throwable t)
Log a message with the debug priority. |
void |
error(java.lang.Object message)
Log an object with error priority. |
void |
error(java.lang.String message)
Log a message with error priority. |
void |
error(java.lang.String message,
java.lang.Throwable t)
Log a message with the error priority. |
static Category |
getCategory(java.lang.String name)
Gets a category with named as the name parameter. |
int |
getDebugLevel()
Gets the level of this Category. |
java.lang.String |
getName()
Gets the category name. |
void |
info(java.lang.Object message)
Log an object with the info priority. |
void |
info(java.lang.String message)
Log a message with info priority. |
void |
info(java.lang.String message,
java.lang.Throwable t)
Log a message with the info priority. |
boolean |
isDebugEnabled()
Check whether this category is enabled for the debug priority. |
boolean |
isInfoEnabled()
Check whether this category is enabled for the info priority. |
void |
setDebugLevel(int level)
Set the level of this Category. |
void |
warn(java.lang.Object message)
Log an object with warn priority. |
void |
warn(java.lang.String message)
Log a message with warn priority. |
void |
warn(java.lang.String message,
java.lang.Throwable t)
Log a message with the warn priority. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEBUG
DEBUG
level designates fine-grained informational events
that are most useful to debug an application.
public static final int INFO
INFO
level designates informational messages
that highlight the progress of the application at coarse-grained
level.
public static final int WARN
WARN
level designates potentially harmful situations.
public static final int ERROR
ERROR
level designates error events that
might still allow the application to continue running.
public static final int NONE
NONE
level is intended to turn off logging.
Method Detail |
public static Category getCategory(java.lang.String name)
name
- the name of a category to get
public void assertLog(boolean assertion, java.lang.String msg)
assertion
parameter is false
, then
logs msg
as an error statement.
assertion
- msg
- The message to print if assertion
is
false.public void debug(java.lang.Object message)
message
- object to convert to String before writing into the log filepublic void debug(java.lang.String message)
message
- string to write in the log filepublic void debug(java.lang.String message, java.lang.Throwable t)
message
- string to appendt
- the exception to log, including a stack tracepublic void error(java.lang.Object message)
message
- object to convert to String before writing into the log filepublic void error(java.lang.String message)
message
- string to write in the log filepublic void error(java.lang.String message, java.lang.Throwable t)
message
- string to appendt
- the exception to log, including a stack tracepublic final java.lang.String getName()
public void info(java.lang.Object message)
message
- object to convert to String before writing into the log filepublic void info(java.lang.String message)
message
- string to write in the log filepublic void info(java.lang.String message, java.lang.Throwable t)
message
- string to appendt
- the exception to log, including a stack tracepublic boolean isDebugEnabled()
true
if this category is debug
enabled, false
otherwise.public boolean isInfoEnabled()
true
if this category is info
enabled, false
otherwise.public void warn(java.lang.Object message)
message
- object to convert to String before writing into the log filepublic void warn(java.lang.String message)
message
- string to write in the log filepublic void warn(java.lang.String message, java.lang.Throwable t)
message
- string to appendt
- the exception to log, including a stack tracepublic int getDebugLevel()
public void setDebugLevel(int level)
level
- category level
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |