|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.libideas.logging.shared.LogHandler
public abstract class LogHandler
A Handler object takes log messages from Logger and publishes them. It is a clone of the Java Logging API. The javadoc below are from the Sun implementation. All handler setup should be guarded by a call to Logger.isLoggingEnabled() A Handler can be disabled by doing a setLevel(Level.OFF) and can be re-enabled by doing a setLevel with an appropriate level.
Constructor Summary | |
---|---|
LogHandler()
|
Method Summary | |
---|---|
void |
clear()
Clears the handler if clear is supported. |
protected java.lang.String |
format(java.lang.String message,
Level level,
java.lang.String category,
java.lang.Throwable e)
A standard way to present category and level information to string output. |
Level |
getLevel()
/** Get the log level specifying which messages will be logged by this Handler. |
void |
hideHandler()
Hides the handler, if hiding is supported. |
boolean |
isSupported()
Is this handler supported in the given compilation configuration? By default the answer is "yes". |
abstract void |
publish(java.lang.String message,
Level level,
java.lang.String category,
java.lang.Throwable e)
publish the message. |
void |
setLevel(Level newLevel)
Set the log level specifying which message levels will be logged by this Handler. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LogHandler()
Method Detail |
---|
public void clear()
public Level getLevel()
public void hideHandler()
public boolean isSupported()
public abstract void publish(java.lang.String message, Level level, java.lang.String category, java.lang.Throwable e)
message
- the messagelevel
- the message's levelcategory
- optional categorye
- optional throwablepublic void setLevel(Level newLevel)
The intention is to allow developers to turn on voluminous logging, but to limit the messages that are sent to certain Handlers.
newLevel
- the new value for the log levelprotected java.lang.String format(java.lang.String message, Level level, java.lang.String category, java.lang.Throwable e)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |