Package org.logevents.status
Class LogEventStatus
- java.lang.Object
-
- org.logevents.status.LogEventStatus
-
public class LogEventStatus extends Object
Keeps tracks and optionally outputs internal messages from Log Events during configuration and usage. Sample configuration (in logevents.properties or as System properties):logevents.status=CONFIG logevents.status.SlackLogEventObserver=TRACE
-
-
Constructor Summary
Constructors Constructor Description LogEventStatus()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConfig(Object location, String message)
Used to provide details about configuration such as files that have been loadedvoid
addDebug(Object location, String message)
Used to notify of significant details during configuration operation, such as which observers are configured and howvoid
addError(Object location, String message, Throwable throwable)
void
addFatal(Object location, String message, Throwable throwable)
void
addInfo(Object location, String message)
Used to notify that significant events have occurred, such as a configuration reload.void
addTrace(Object location, String message)
Used to notify of significant actions during normal operation, for example every time data is submitted to an external APIvoid
clear()
void
configure(Configuration configuration)
List<StatusEvent>
getAllMessages()
List<StatusEvent>
getHeadMessages()
static LogEventStatus
getInstance()
List<StatusEvent>
getMessages(Object target, StatusEvent.StatusLevel threshold)
List<String>
getMessageTexts(Object target, StatusEvent.StatusLevel level)
StatusEvent.StatusLevel
getThreshold(Object location)
StatusEvent
lastMessage()
StatusEvent.StatusLevel
setThreshold(StatusEvent.StatusLevel threshold)
String
toString()
-
-
-
Method Detail
-
getInstance
public static LogEventStatus getInstance()
-
configure
public void configure(Configuration configuration)
-
getThreshold
public StatusEvent.StatusLevel getThreshold(Object location)
-
setThreshold
public StatusEvent.StatusLevel setThreshold(StatusEvent.StatusLevel threshold)
-
addInfo
public void addInfo(Object location, String message)
Used to notify that significant events have occurred, such as a configuration reload. Enabled by default.
-
addConfig
public void addConfig(Object location, String message)
Used to provide details about configuration such as files that have been loaded
-
addDebug
public void addDebug(Object location, String message)
Used to notify of significant details during configuration operation, such as which observers are configured and how
-
addTrace
public void addTrace(Object location, String message)
Used to notify of significant actions during normal operation, for example every time data is submitted to an external API
-
getMessageTexts
public List<String> getMessageTexts(Object target, StatusEvent.StatusLevel level)
-
getMessages
public List<StatusEvent> getMessages(Object target, StatusEvent.StatusLevel threshold)
-
getHeadMessages
public List<StatusEvent> getHeadMessages()
-
getAllMessages
public List<StatusEvent> getAllMessages()
-
lastMessage
public StatusEvent lastMessage()
-
clear
public void clear()
-
-