Package io.github.pimak.ntfy.jul
Class NtfyJulAutoHandler
java.lang.Object
java.util.logging.Handler
io.github.pimak.ntfy.jul.NtfyJulAutoHandler
Declarative zero-code entry point: name this class in a JUL
logging.properties —
handlers = java.util.logging.ConsoleHandler, io.github.pimak.ntfy.jul.NtfyJulAutoHandler
— and LogManager instantiates it reflectively at logging init (the same mechanism
Tomcat's conf/logging.properties uses). Configuration comes from the ambient environment
via JulAmbientConfig (-Dntfy.* > NTFY_* > classpath
ntfy.properties), not from LogManager properties, so the keys are identical
across every adapter in the family.
Composes rather than extends NtfyJulHandler: when the environment does not configure
ntfy (or the classpath-endpoint guard refuses), the delegate is absent and this handler is a
permanent no-op — the constructor must never throw, because LogManager would report it
as a logging-configuration error on every startup.
-
Constructor Summary
ConstructorsConstructorDescriptionInvoked reflectively byLogManager; also usable directly. -
Method Summary
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
-
Constructor Details
-
NtfyJulAutoHandler
public NtfyJulAutoHandler()Invoked reflectively byLogManager; also usable directly. Never throws.
-
-
Method Details