Package com.ultikits.ultitools.utils
Class PluginLoggerBridge
java.lang.Object
java.util.logging.Handler
com.ultikits.ultitools.utils.PluginLoggerBridge
Forwards the records of a dedicated diagnostics logger to the framework's own plugin logger, so they
reach the server console at their real level and in the server's normal log format (#557).
The two diagnostics that use it, ClassloadFilterAudit and ModuleScanDiagnostics, keep
their own non-root logger with parent handlers disabled, so a record never propagates on its own to
the root logger SystemLogHandler watches. What this bridge forwards is a copy, logged on the
plugin logger; both classes emit only records without a Throwable at SEVERE, which is what
SystemLogHandler would auto-report, so forwarding does not turn a summary into an error
report.
Forwarding is skipped, silently, when the plugin instance or its logger is not available (a unit test, or a call before the plugin is enabled): a diagnostic must never break the work it reports on.
- Since:
- 6.3.0
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
-
Constructor Details
-
PluginLoggerBridge
PluginLoggerBridge(Level level) - Parameters:
level- the least severe level to forward
-
-
Method Details