Package org.logevents.impl
Class JavaUtilLoggingAdapter
- java.lang.Object
-
- java.util.logging.Handler
-
- org.logevents.impl.JavaUtilLoggingAdapter
-
public class JavaUtilLoggingAdapter extends Handler
An adapter from java.util.logging to LogEvents. Install by callinginstall(LogEventFactory)
-
-
Constructor Summary
Constructors Constructor Description JavaUtilLoggingAdapter(LogEventFactory factory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
flush()
static void
install(LogEventFactory factory)
Ensures that logging toLogger
is intercepted.void
publish(LogRecord record)
-
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
-
-
-
-
Constructor Detail
-
JavaUtilLoggingAdapter
public JavaUtilLoggingAdapter(LogEventFactory factory)
-
-
Method Detail
-
install
public static void install(LogEventFactory factory)
Ensures that logging toLogger
is intercepted. Removes existing java.util.logging handlers and adds a newJavaUtilLoggingAdapter
-
close
public void close() throws SecurityException
- Specified by:
close
in classHandler
- Throws:
SecurityException
-
-