|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.datatools.connectivity.oda.util.logging.Handler
public abstract class Handler
Handler
is an abstract class that takes LogRecords
from a Logger
and processes them using its Formatter.
All log handler should inherit from this class and may publish
log records to its supported sources. (e.g. console, file, etc. )
Method Summary | |
---|---|
abstract void |
close()
Close the Handler and free up resources. |
abstract void |
flush()
Flushes buffered output. |
Filter |
getFilter()
Gets the Filter associated with this Handler . |
LogFormatter |
getFormatter()
Gets the LogFormatter associated with this Handler . |
Level |
getLevel()
Gets the Level associated with this Handler . |
LoggingErrorHandler |
getLoggingErrorHandler()
Gets the LoggingErrorHandler associated with this Handler . |
boolean |
isLoggable(LogRecord record)
Checks whether the specified LogRecord should be logged. |
abstract void |
publish(LogRecord record)
Publish the specified LogRecord . |
void |
setFilter(Filter filter)
Sets the Filter for this Handler . |
void |
setFormatter(LogFormatter formatter)
Sets the LogFormatter for this Handler . |
void |
setLevel(Level level)
Sets the Level for this Handler . |
void |
setLoggingErrorHandler(LoggingErrorHandler errorHandler)
Sets the LoggingErrorHandler for this Handler . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public abstract void close()
Handler
and free up resources.
public abstract void flush()
public abstract void publish(LogRecord record)
LogRecord
. The record should
only be published if it has the adequate log level, passes the
associated Filter
. This is responsible for formatting
the LogRecord
, if necessary.
record
- the log record to publish.public boolean isLoggable(LogRecord record)
LogRecord
should be logged.
This checks whether the LogRecord
has the adequate log level,
passes the associated Filter
, or other Handler
specific checks.
record
- the log record.
public void setLoggingErrorHandler(LoggingErrorHandler errorHandler)
LoggingErrorHandler
for this Handler
.
errorHandler
- the error handler to set.public LoggingErrorHandler getLoggingErrorHandler()
LoggingErrorHandler
associated with this Handler
.
public void setFilter(Filter filter)
Filter
for this Handler
.
filter
- the filter to set.public Filter getFilter()
Filter
associated with this Handler
.
public void setFormatter(LogFormatter formatter)
LogFormatter
for this Handler
.
formatter
- the formatter to set.public LogFormatter getFormatter()
LogFormatter
associated with this Handler
.
public void setLevel(Level level)
Level
for this Handler
.
level
- the level to set.public Level getLevel()
Level
associated with this Handler
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |