Interface LogEntryListener


@ConsumerType public interface LogEntryListener
Whiteboard-style callback for newly recorded log entries.

Listeners are notified synchronously on the logging thread after the entry has been recorded, so implementations must not block or perform expensive work. They must also be careful not to log at levels that are captured, to avoid re-entrant notification.

Listeners registered before log entries start being recorded begin receiving callbacks as soon as recording is active. Listeners that unregister stop receiving callbacks before the next entry is recorded.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Notification that a new LogEntry was recorded.
  • Method Details

    • onEntry

      void onEntry(LogEntry entry)
      Notification that a new LogEntry was recorded.
      Parameters:
      entry - the entry that was just recorded; never null