clearLogEntries function exported ✓ 100.0%

Last updated: 2026-03-01T23:25:47.125Z

Metrics

LOC: 19 Complexity: 4 Params: 0 Coverage: 100.0% (9/9 lines, 3x executed)

Signature

clearLogEntries(): : Promise<void>

Summary

Clears all log entries from memory and storage.

Source Code

export async function clearLogEntries(): Promise<void> {
  localEntries = [];
  pendingEntries = [];

  if (flushTimer) {
    clearTimeout(flushTimer);
    flushTimer = null;
  }

  if (hasSessionStorage()) {
    try {
      await chrome.storage.session.set({ [STORAGE_KEY]: [] });
    } catch {
      // Ignore
    }
  }

  notifyListeners();
}

Dependencies (Outgoing)

graph LR clearLogEntries["clearLogEntries"] hasSessionStorage["hasSessionStorage"] notifyListeners["notifyListeners"] clearLogEntries -->|calls| hasSessionStorage clearLogEntries -->|calls| notifyListeners style clearLogEntries fill:#dbeafe,stroke:#2563eb,stroke-width:2px click clearLogEntries "b955aae3387005ad.html" click hasSessionStorage "a7e74519d0293203.html" click notifyListeners "907bc8a226709b64.html"
TargetType
hasSessionStorage calls
notifyListeners calls

Impact (Incoming)

graph LR clearLogEntries["clearLogEntries"] LogViewerVariant["LogViewerVariant"] render["render"] LogViewerVariant -->|uses| clearLogEntries render -->|calls| clearLogEntries style clearLogEntries fill:#dbeafe,stroke:#2563eb,stroke-width:2px click clearLogEntries "b955aae3387005ad.html" click LogViewerVariant "3e8313bcae7abdc5.html" click render "80ece8fdb820f2e0.html"
SourceType
LogViewerVariant uses
render calls