Package com.zfabrik.util.logging
Class JMXLogHandler
java.lang.Object
java.util.logging.Handler
java.util.logging.StreamHandler
com.zfabrik.util.logging.JMXLogHandler
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 under
zfabrik/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 -
Method Summary
Methods inherited from class java.util.logging.StreamHandler
close, flush, isLoggable, setEncoding, setOutputStream
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, reportError, setErrorManager, setFilter, setFormatter, setLevel
-
Constructor Details
-
JMXLogHandler
public JMXLogHandler()
-
-
Method Details
-
publish
- Overrides:
publish
in classStreamHandler
-