Class ChangingStatusLogger
- java.lang.Object
-
- de.fraunhofer.iosb.ilt.frostserver.util.ChangingStatusLogger
-
public class ChangingStatusLogger extends Object
A logger that regularly logs a status message, if the status has changed.- Author:
- hylke
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceChangingStatusLogger.ChangingStatusImplementations MUST override the equals method.static classChangingStatusLogger.ChangingStatusDefault
-
Constructor Summary
Constructors Constructor Description ChangingStatusLogger(org.slf4j.Logger logger)Create a new logger, with the given logger, message and status.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChangingStatusLoggeraddLogStatus(ChangingStatusLogger.ChangingStatus logStatus)ChangingStatusLoggerremoveLogStatus(ChangingStatusLogger.ChangingStatus logStatus)ChangingStatusLoggersetLogIntervalMs(long logIntervalMs)ChangingStatusLoggerstart()voidstop()
-
-
-
Constructor Detail
-
ChangingStatusLogger
public ChangingStatusLogger(org.slf4j.Logger logger)
Create a new logger, with the given logger, message and status. The status should match the message in that the number of placeholders in the message must be the same as the number of items in the status.- Parameters:
logger- The logger to log to.
-
-
Method Detail
-
addLogStatus
public ChangingStatusLogger addLogStatus(ChangingStatusLogger.ChangingStatus logStatus)
-
removeLogStatus
public ChangingStatusLogger removeLogStatus(ChangingStatusLogger.ChangingStatus logStatus)
-
setLogIntervalMs
public ChangingStatusLogger setLogIntervalMs(long logIntervalMs)
-
start
public ChangingStatusLogger start()
-
stop
public void stop()
-
-