com.antelmann.util.logging
Class LoggerHandler
java.lang.Object
java.util.logging.Handler
com.antelmann.util.logging.LoggerHandler
- All Implemented Interfaces:
- Converter<LogEntry,LogRecord>, LoggerProvider
public class LoggerHandler
- extends Handler
- implements Converter<LogEntry,LogRecord>, LoggerProvider
provides a bridge to the java.util.logging facility
- Since:
- 11.03.2011, 00:14:43
- Author:
- Holger Antelmann
| 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 |
LoggerHandler
public LoggerHandler()
LoggerHandler
public LoggerHandler(LogWriter writer)
LoggerHandler
public LoggerHandler(Logger logger)
- instantiates a handler that publishes LogRecords to the given logger
getLogger
public Logger getLogger()
- Description copied from interface:
LoggerProvider
- acess to the (non-null) Logger suitable for logging entries in the context of this instance
- Specified by:
getLogger in interface LoggerProvider
createWriter
public static LogWriter createWriter(Logger logger,
Filter filter)
- provides a LogWriter that publishes LogEntries to the given java.util.loggin.Logger
publish
public void publish(LogRecord record)
- Specified by:
publish in class Handler
flush
public void flush()
- Specified by:
flush in class Handler
close
public void close()
throws SecurityException
- Specified by:
close in class Handler
- Throws:
SecurityException
convert
public LogRecord convert(LogEntry le)
- Specified by:
convert in interface Converter<LogEntry,LogRecord>
convertBack
public LogEntry convertBack(LogRecord lr)
- Specified by:
convertBack in interface Converter<LogEntry,LogRecord>
(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads