Skip to content

Log analysis

Enable the Log panel from App, select the App or Device source, and choose Analyze. The analyzer examines buffered entries for that source and active protocol, including captured levels hidden by the level toggles. It does not read the entire log file or actively test a radio connection.

Analyze with AI (optional): when App → AI conversation summaries is enabled and an engine is ready, the Analyze modal offers Analyze with AI only when the rule-based analyzer produced at least one finding. Empty or info-only views keep the button disabled so the model cannot invent issues from troubleshooting docs alone. That path needs an internet connection so the app can fetch allowlisted troubleshooting markdown (same pages as the published docs site) and pack matching sections with the rule-based findings into a single ai:summarize request (surface: 'log'). Offline users, or anyone without AI configured, keep the built-in heuristic Analyze only. Log samples may leave the device for a configured local/remote engine; the docs fetch is public site content only. See AI conversation summaries.

Log lines may carry an owning radio stack (protocol on the in-memory entry; [proto=…] on disk in mesh-client.log). Lines owned by another radio are hidden from that tab’s App/Device views and excluded from Analyze (shown as an ignored-lines count). Shared / unattributable lines remain visible and analyzable from every tab. Tag ownership lives in src/shared/logProtocolScope.ts; scripts/check-log-panel-filter.mjs fails CI when a protocol-tree emitter uses an unregistered tag.

Disk (mesh-client.log): appendLine in src/main/log-service.ts stamps [proto=…] only from an explicit protocol argument or from resolveLogProtocolFromChannel in src/shared/logProtocolChannelResolve.ts (IPC channel tokens, [BLE:meshcore], connection stack=…, and similar — not the tag registry). Main-process MQTT broker lines often carry [Meshtastic MQTT] / [MeshCore MQTT] prefixes; those tags are not consulted on the disk path, so broker logs may be written without [proto=…] unless the emitter passed protocol.

In-app Log panel: the renderer uses LOG_TAG_SCOPE in src/shared/logProtocolScope.ts (resolveLogProtocol / message tags). Registered MQTT tags can classify a line on the correct protocol tab in memory even when the on-disk file has no [proto=…].

Analyze MQTT finding categories are scoped to Meshtastic and MeshCore tabs only.

Each finding shows a count and latest message. Expand View evidence for the newest 20 matching entries with timestamps, levels, sources, and owner when present. The recommendations below the findings explain what to check. Copy troubleshooting report creates a plain-text summary with UTC timestamps, guidance, and up to three samples per finding. The copy happens only after clicking the button. Log samples can contain private information; review them before sharing. Log → Export and App → Support / Bug reports → Export for GitHub provide the fuller context when needed.

Findings describe historical events, not necessarily ongoing failures. One line may match several categories, so category counts are not a count of unique incidents. Other warnings and errors retains unmatched warning/error lines without inventing a diagnosis; expected recovery messages can appear there. Cancelled page loads (ERR_ABORTED), unpackaged Electron security warnings (experimentalFeatures / enableBlinkFeatures, expected in pnpm run dev), and unmatched Meshtastic SDK NO_RESPONSE / packet-timeout lines (chat failures are already surfaced in-app) remain excluded from findings.

Review of current logging

Issue #915 prompted an inventory of TypeScript log calls and Rust sidecar warning/error emitters, followed by a comparison with the existing patterns and the sidecar forwarding code. The review found that the recommendation resolver was ignoring the category recommendation map, causing specific failures to display generic internal-error advice. USB serial also lacked a recommendation. Both are now covered by map-completeness tests. Later emitters (MQTT packet caps, RF transport loss, auto-connect, MECP, offline maps, and related families) were added to the analyzer with requireWarnOrError and emitter-backed fixtures.

Log family Analysis coverage and decision
BLE, handshake, pairing, notify watchdogs Retain transport patterns. Exclude dual-radio bleCoexistence coordination from BLE connection findings. Linux [IPC] bluetooth-connect failures join pairing guidance. Device info with state=disconnected is not itself a connection failure.
MQTT, packet limit, retries, SDKs Recognize tagged [Meshtastic MQTT] / [MeshCore MQTT] network, timeout, reconnect, connection-watchdog, wake token-refresh, and invalid publish PSK lines. Dedicated mqtt-packet-limit when the broker exceeds the safety cap and automatic reconnect is disabled. Do not classify bare [IPC] mqtt:… failed as broker issues. Level-gated SDK categories remain.
RF transport loss Recognize [meshtasticTransportLoss] and [meshcoreSerialTransportLoss] link-lost lines (transport-loss).
Startup RF auto-connect Recognize timed-out and transport auto-connect failures from useProtocolRfAutoConnect (rf-auto-connect). Cancelled/skipped coexistence paths stay unclassified.
Power-save / wake Recognize powerSaveBlocker start/stop failures. Reticulum power-resume reconnect failures extend reticulum-sidecar.
TCP and USB serial Meshtastic TCP connect/write failures alongside MeshCore TCP. Actionable serial-reconnect guidance retained.
Database initialization, migrations, permissions Retain existing checks. Separately identify [dbPersistRetry] degraded persistence when retries exhaust or the write queue drops data.
App crashes and UI stalls Retain process/load failures; renderer heartbeat stalls and Electron unresponsive events from rendererHeartbeatWatchdog.ts. Recovery messages are not new hang findings.
Reticulum service Watchdog health failures/restarts, failed start/stop, event/voice WebSocket errors, failed runtime restarts, and power-resume reconnect failures. Avoid classifying every [ReticulumSidecar] warning as an outage.
Reticulum delivery and propagation Terminal LXMF delivery/path-budget failures and failed propagation sync. Reticulum decrypt failures receive delivery guidance rather than LoRa channel-key advice.
Reticulum pressure and dropped events Bounded-channel saturation, WebSocket subscriber lag, payload cap drops, and failed path-request enqueue.
Firmware flashing ESP32/nRF52 flasher stall messages that close the serial port.
Nomad hosting, TAK server, remote TAK relay, updater, Store & Forward Retain dedicated patterns. TAK chat/DM/geochat bridge failures (tak-chat) cover tags outside [TakServer] / [TakRemote].
MECP Rebroadcast send failures, local audit append/rotate failures, language-pack load failures, and compose send/GPS failures (mecp). Public support bundles omit MECP audit details.
Offline maps Region download/job failures, MBTiles inspect/import failures, custom-source cleanup, and unreadable custom-sources.json (offline-maps). Corrupt-row skips (dropped invalid custom source record) stay unclassified.
MeshCore companion / remote CLI Companion CLI section and remote CLI flag read/write failures (meshcore-cli, MeshCore protocol only).
AI catch-up / model pack Model download failures and catch-up startup status unavailable (ai-summary).
Live traffic map Pop-out open/close/origin failures, window boot/init, regional feed resume, and keep-on-top / return-to-main failures (live-map).
COI / renderer memory COI measurement/persist failures and renderer-memory auto-sampler persist failures (coi-memory). Debug-only metric/pid unavailable lines are not findings.
GPS IP fallback [gps] ip fix failed and inetChecksite preflight failed (gps). Radio GPS and static location are separate.
Other UI, storage, remote/RRC, voice, games, and configuration logs Keep unmatched warnings/errors as evidence. A module prefix alone is insufficient to diagnose corruption, unreachable peers, or a broken service.

Maintaining patterns

The pure analyzer lives in src/renderer/lib/logAnalyzer.ts. Add a specific emitter-backed failure pattern and a harmless counterexample in logAnalyzer.currentLogs.test.ts. Add static label and recommendation keys in logAnalyzerI18n.ts plus English strings; run the normal translation workflow. logAnalyzerI18n.test.ts checks that every category label has specific, resolvable advice. Prefer requireWarnOrError: true for new categories so debug noise does not become a finding.

When adding a new [TAG] console prefix in a protocol-owned tree (src/renderer/lib/{meshtastic,meshcore,reticulum}/, MeshCore hooks, runtimes, main mqtt/gatt/reticulum/ipc), register it in LOG_TAG_SCOPE in src/shared/logProtocolScope.ts (or add // log-filter-ok <reason> on the call site if it must stay shared). Run pnpm run check:log-panel-filter.

Reticulum forwards some informational Rust tracing messages through the warning console channel for support visibility. Do not add broad prefix-only rules for it. Inspect reticulum-sidecar-manager.ts and the original Rust emitter before inferring failure from the captured level. Preserve protocol gating and cancellation exclusions, and do not infer recovery or current health without evidence.