|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A log target is a destination for log messages. You can register these with the LogManager to set yourself up to receive a variety of messages. For most log users the LogFile implementation of this interface will be adequate.
Method Summary | |
void |
addObserver(LogSystem ls)
A LogSystem will register itself though this method in order to detect changes to the LogTarget. |
void |
flush()
Flush the log. |
void |
log(java.util.Date date,
java.lang.String type,
java.lang.String level,
java.lang.String message,
java.lang.Throwable e)
Log out an event that just happened and which you have previously accepted. |
void |
removeObserver(LogSystem ls)
A LogSystem may remove itself through this method if it de-registeres the LogTarget. |
boolean |
subscribe(java.lang.String category,
java.lang.String type,
int logLevel)
Return true or false if this log target would like to receive log messages for the named category, type, and logLevel. |
Method Detail |
public void log(java.util.Date date, java.lang.String type, java.lang.String level, java.lang.String message, java.lang.Throwable e)
public void flush()
public boolean subscribe(java.lang.String category, java.lang.String type, int logLevel)
The logLevel you will be called with is one of the integers Log.ALL, Log.DEBUG, Log.INFO, Log.NOTICE, Log.WARNING, Log.ERROR, and Log.NONE in ascending order (Log.ERROR is a higher number than Log.WARNING which is a higher number than Log.DEBUG). In other words, the higher the logLevel the more important the log message is.
public void addObserver(LogSystem ls)
public void removeObserver(LogSystem ls)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |