Package com.zfabrik.util.logging
Class JMXLogHandler
- java.lang.Object
-
- java.util.logging.Handler
-
- java.util.logging.StreamHandler
-
- com.zfabrik.util.logging.JMXLogHandler
-
public class JMXLogHandler extends java.util.logging.StreamHandler
LogHandler that provides the JUL log outputs as a counter per log-level for JMX.Add this handler to the JUL logging.properties configuration file to the
handlers
property:.level=INFO ... handlers=...,com.zfabrik.util.logging.JMXLogHandler ...
The handler exposes the following counters as JMX attributes underzfabrik/com.zfabrik.logging/JULMetrics
:- LogFinest - counts the number of log entries of the FINEST level
- LogFiner - counts the number of log entries of the FINER level
- LogFine - counts the number of log entries of the FINE level
- LogConfig - counts the number of log entries of the CONFIG level
- LogInfo - counts the number of log entries of the INFO level
- LogWarning - counts the number of log entries of the WARNING level
- LogSevere - counts the number of log entries of the SEVERE level
-
-
Constructor Summary
Constructors Constructor Description JMXLogHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
publish(java.util.logging.LogRecord record)
-
Methods inherited from class java.util.logging.StreamHandler
close, flush, isLoggable, setEncoding, setOutputStream
-
-