Interface GatewayLoggingManager

All Superinterfaces:
LogFilterSettings

public interface GatewayLoggingManager extends 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 Details

  • Method Details

    • getOrCreateMonitoringSession

      MonitoringSession getOrCreateMonitoringSession(String id)
      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

      LogResults queryLogEvents(LogQueryConfig filter)
    • getLogPropertyRegistry

      LogPropertyRegistry getLogPropertyRegistry()
      Returns the LogPropertyRegistry from the gateway logging manager. This registry contains known
    • collectKnownLogProperties

      default com.google.common.collect.Multimap<String,String> collectKnownLogProperties()
      The MDC keys and values known to this gateway: those registered in the LogPropertyRegistry, 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.