Rio Project 4.2 API Documentation
org.rioproject.log
Class ServiceLogEventHandler
java.lang.Object
java.util.logging.Handler
org.rioproject.log.ServiceLogEventHandler
- All Implemented Interfaces:
- ServiceLogEventHandlerMBean
public class ServiceLogEventHandler
- extends Handler
- implements ServiceLogEventHandlerMBean
A @link java.util.logging.Handler} that publishes ServiceLogEvents
to interested consumers when a LogRecord of
interest is logged.
A LogRecord of interest is one that contains an
exception.
The ServiceLogEventHandler will also publish
ServiceLogEvents to interested consumers if the LogRecord
has a level that is greater than or equal to the ServiceLogEventHandler's
configured Level property (the default for this is
Level.SEVERE), and whose name has been configured as a
publishable logger. Matching semantics for a publishable logger
name (as obtained from LogRecord.getLoggerName()
starts with a configured publishable logger name.
| Methods inherited from class java.util.logging.Handler |
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServiceLogEventHandler
public ServiceLogEventHandler()
setEventHandler
public void setEventHandler(EventHandler eventHandler)
setSource
public void setSource(EventProducer source)
getSource
public EventProducer getSource()
setPublishOnLevel
public void setPublishOnLevel(String level)
- Specified by:
setPublishOnLevel in interface ServiceLogEventHandlerMBean
setPublishOnLevel
public void setPublishOnLevel(Level level)
getPublishOnLevel
public String getPublishOnLevel()
- Specified by:
getPublishOnLevel in interface ServiceLogEventHandlerMBean
addPublishableLogger
public boolean addPublishableLogger(String publishableLogger)
- Specified by:
addPublishableLogger in interface ServiceLogEventHandlerMBean
removePublishableLogger
public boolean removePublishableLogger(String publishableLogger)
- Specified by:
removePublishableLogger in interface ServiceLogEventHandlerMBean
setPublishableLoggers
public void setPublishableLoggers(Collection<String> publishableLoggers)
getPublishableLoggers
public Collection<String> getPublishableLoggers()
- Specified by:
getPublishableLoggers in interface ServiceLogEventHandlerMBean
publish
public void publish(LogRecord logRecord)
- Specified by:
publish in class Handler
flush
public void flush()
- Specified by:
flush in class Handler
close
public void close()
- Specified by:
close in class Handler
Copyright © 2006-2011 Rio Project. All Rights Reserved.