Package org.lsst.ccs.messaging
Class LogBusHandler
java.lang.Object
java.util.logging.Handler
org.lsst.ccs.messaging.LogBusHandler
- All Implemented Interfaces:
Closeable,AutoCloseable
A java util log Handler that forwards messages to the Log bus.
As it may be used in the context of "multi-logging" of the org.lsst.ccs.utilities.logging
package it checks for duplicate messages.
Should be a singleton with delegation to a unique static instance (but how to pass the communication layer?) If we share two subsystems on the same JVM the Singleton will not work so it is utmost importance to get the subsystemName directly and create two instances!!!
Should be a singleton with delegation to a unique static instance (but how to pass the communication layer?) If we share two subsystems on the same JVM the Singleton will not work so it is utmost importance to get the subsystemName directly and create two instances!!!
- Author:
- bamade
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected ExecutorServiceprotected booleanprotected AgentMessagingLayerprotected String -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter
-
Field Details
-
messagingAccess
-
closed
protected boolean closed -
subSystemName
-
executor
-
logBusInitialized
protected volatile boolean logBusInitialized
-
-
Constructor Details
-
LogBusHandler
-
-
Method Details
-
publish
should send a LogRecord over the Log Bus. -
flush
public void flush() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classHandler- Throws:
SecurityException
-
setLevel
-