Interface GatewayLoggingManager
- All Superinterfaces:
LogFilterSettings
The Gateway Logging Manager extends the logging manager to provide the idea of monitoring
sessions, which can be used to collect specific sets of logs for a short amount of time. It also
provides the idea of "system events", which are log events with special markers indicating that
they are noteworthy "events" for a given system.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionThe MDC keys and values known to this gateway: those registered in theLogPropertyRegistry, merged with those observed in the log store's property table.Returns theLogPropertyRegistryfrom the gateway logging manager.Gets or creates a monitoring session with the specified id.default booleanWhether a log store is reachable, so a caller can tell "nothing matched" from "nothing could be read".queryLogEvents(LogQueryConfig filter) Methods inherited from interface LogFilterSettings
addPropertyFilter, clearPropertyLevel, clearPropertyLevels, propertyFilterSettings, removePropertyFilter, setLevel, setPropertyLevel
-
Field Details
-
EVENT_PREFIX
- See Also:
-
-
Method Details
-
getOrCreateMonitoringSession
Gets or creates a monitoring session with the specified id. If null or empty string is passed in, the global session will be returned. -
queryLogEvents
-
getLogPropertyRegistry
LogPropertyRegistry getLogPropertyRegistry()Returns theLogPropertyRegistryfrom the gateway logging manager. This registry contains known -
collectKnownLogProperties
The MDC keys and values known to this gateway: those registered in theLogPropertyRegistry, merged with those observed in the log store's property table.That table is pruned oldest-first, and how far back it reaches depends on log volume, so a missing key means nothing logged with it recently rather than that the key does not exist. Where no log store is reachable, only the registered keys come back.
- Returns:
- known MDC key/value pairs, empty if neither source has any.
-
isLogStoreAvailable
default boolean isLogStoreAvailable()Whether a log store is reachable, so a caller can tell "nothing matched" from "nothing could be read".queryLogEvents(LogQueryConfig)reports a store failure by logging it and returning an empty result, which is the right call for a viewer paging through events and the wrong one for anything that treats an empty result as a finding. Check this before concluding anything from emptiness.A true answer means a store was reachable when this was asked, not that the query about to run will succeed.
- Returns:
- true if log events can be queried.
-