|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.logging.Handler toolbox.services.util.logging.support.LoggingServiceHandler
public class LoggingServiceHandler
A JDK logging handler implementation to facilitate interaction with the LoggingService from the standard java.util.logging package.
This handler will publish records to the logging service configured in the environment where this handler is used.
This handler supports the following configuration properties:
Constructor Summary | |
---|---|
LoggingServiceHandler()
Default constructor. |
|
LoggingServiceHandler(java.lang.String registry,
java.lang.String service,
java.lang.String detailDelim)
Construct this handler with the logging service configuration. |
Method Summary | |
---|---|
void |
close()
Not implemented. |
void |
flush()
Not implemented. |
boolean |
isLoggable(java.util.logging.LogRecord record)
Check to see if this Handler would actually log a given record. |
void |
publish(java.util.logging.LogRecord record)
Publish the given LogRecord to the LoggingService. |
Methods inherited from class java.util.logging.Handler |
---|
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LoggingServiceHandler()
public LoggingServiceHandler(java.lang.String registry, java.lang.String service, java.lang.String detailDelim)
registry
- String contaiing the name of the registry where the
logging service is configured.service
- String containing the name of the logging service
instance to use.detailDelim
- String containing a simple delimiter that will
be used to split log messages into parts.Method Detail |
---|
public void publish(java.util.logging.LogRecord record)
This implementation transforms the LogRecord into a LogMessage and publishes the LogMessage using the configured LoggingService implementation.
publish
in class java.util.logging.Handler
record
- The LogRecord to publish.public boolean isLoggable(java.util.logging.LogRecord record)
This implementation checks to see whehter the member LoggingService was initialised correctly and ensures that level is not lower than Level.INFO. If these checks are successfully the parent check method is invoked for further verification.
isLoggable
in class java.util.logging.Handler
record
- The LogRecord to check.
public void flush()
flush
in class java.util.logging.Handler
public void close()
close
in class java.util.logging.Handler
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |