Class LogPanel

All Implemented Interfaces:
Logger.LogListener, Logger.ReplayableLogListener, ImageObserver, MenuContainer, Serializable, Accessible

public class LogPanel extends JPanel implements Logger.ReplayableLogListener
Log view with level filter, pause autoscroll, clear/copy/save, text filter (case/regex), search (case/regex, highlight all, match count), and duplicate compaction.

Design: Coordinates a LogStore (model) with a LogRenderer (view). Keeps regex compilation and flag rules centralized via Regex.

Threading: All UI mutations occur on the EDT. Logger callbacks are marshaled with invokeLater to preserve ordering and avoid contention with highlight recomputation.

See Also:
  • Constructor Details

    • LogPanel

      public LogPanel()
      Constructs and wires the UI (EDT).
  • Method Details

    • addNotify

      public void addNotify()
      Registers with Logger when this panel is added to the display hierarchy. Burp may remove our tab content when another top-level tab is selected and re-add when the user switches back; we only receive log messages while registered, so we register here and unregister in removeNotify. Logger replays recent messages to newly registered listeners so the Log tab shows full history after a tab switch.
      Overrides:
      addNotify in class JComponent
    • removeNotify

      public void removeNotify()
      Lifecycle hook: unregisters from Logger (so we stop receiving while not in the hierarchy) and closes regex bindings when removed. Re-registration happens in addNotify when shown again.
      Overrides:
      removeNotify in class JComponent
    • onLog

      public void onLog(String level, String message)
      Logger callback; invoked on the EDT by Logger so ingestion runs on the UI thread.
      Specified by:
      onLog in interface Logger.LogListener
      Parameters:
      level - level string from Logger
      message - log message (nullable)