Skip to content

feat(kiwisdr): dedicated Support-menu logging categories#3676

Merged
ten9876 merged 1 commit into
mainfrom
feat/kiwisdr-logging
Jun 20, 2026
Merged

feat(kiwisdr): dedicated Support-menu logging categories#3676
ten9876 merged 1 commit into
mainfrom
feat/kiwisdr-logging

Conversation

@ten9876

@ten9876 ten9876 commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #3668. KiwiSDR currently borrows the shared aether.protocol logging category (so its messages can't be toggled apart from SmartSDR protocol logging), and four of its five source files log nothing at all. This adds two dedicated QLoggingCategory entries that surface as checkboxes in Help → Support → Diagnostic Logging (auto-built from LogManager's category list).

What changed

  • aether.kiwisdr — "KiwiSDR" (default ON): the connection/diagnosis story — connect/disconnect, handshake, audio-rate/waterfall negotiation, reconnect scheduling, profile add/remove, slice assignment, and the virtual-RX-antenna select/clear (which logs that no antenna command is sent to the radio — Principle I).
  • aether.kiwisdr.audio — "KiwiSDR Audio/DSP" (default OFF, verbose): per-source audio enable/disable/remove and frame-shape diagnostics. Mirrors the existing aether.audio / aether.audio.summary split so the high-rate decode chatter is separately toggleable.
  • Migrated the 14 existing KiwiSdrClient calls off aether.protocol onto these categories, so KiwiSDR logging toggles independently of SmartSDR protocol logging.
  • Added lifecycle logging to the previously-silent KiwiSdrManager and MainWindow_KiwiSdr.
  • Warnings (unsupported stream shapes, invalid passband) always pass the filter regardless of toggle.

Notes

  • No new flat AppSettings keys — the Support dialog auto-persists each category under its existing LogCategory_* key; only the two m_categories rows + defaultOn entry are added.
  • Cross-platform: pure QLoggingCategory / LogManager, no platform-specific code.

Test plan

  • Builds clean on current main
  • kiwi_sdr_protocol_test + spectral_nr_test pass
  • Verified both categories register and appear in the Support dialog (auto-built from the category list)

🤖 Generated with Claude Code

Adds two QLoggingCategory entries that surface as checkboxes in Help → Support
(auto-built from LogManager's category list):

- aether.kiwisdr ("KiwiSDR", default ON): connect/disconnect, handshake, sample-
  rate/waterfall negotiation, reconnect scheduling, profile add/remove, slice
  assignment, and the virtual-RX-antenna select/clear (which logs that no antenna
  command is sent to the radio — Principle I).
- aether.kiwisdr.audio ("KiwiSDR Audio/DSP", default OFF, verbose): per-source
  audio enable/disable/remove and frame-shape diagnostics.

Migrates the existing 14 KiwiSdrClient logging calls off the shared
aether.protocol category onto these, so KiwiSDR logging toggles independently of
SmartSDR protocol logging. Adds lifecycle logging to the previously-silent
KiwiSdrManager and MainWindow_KiwiSdr. Warnings (unsupported stream shapes,
invalid passband) always pass the filter regardless of toggle.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ten9876 ten9876 requested a review from a team as a code owner June 20, 2026 03:16

@aethersdr-agent aethersdr-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the follow-up @ten9876 — this is clean and well-scoped. I verified the key behaviors:

Looks good

  • The two new categories follow the existing Q_LOGGING_CATEGORYm_categoriesdefaultOn pattern exactly. aether.kiwisdr declared QtDebugMsg + added to defaultOn (consistent with lcProtocol/lcConnection/lcDiscovery), and aether.kiwisdr.audio declared QtWarningMsg + left off — so under applyFilterRules()'s aether.*.debug=false baseline, audio warnings always pass while debug follows the checkbox. Matches the stated design.
  • All 14 lcProtocol call sites in KiwiSdrClient.cpp are migrated — base had exactly 14, the diff touches all of them, no stragglers left borrowing the SmartSDR category.
  • Log placements are safe: connectProfile's new line sits after the idx/endpoint/hasTrackedSlice early-returns and only dereferences the validated m_profiles[idx]; displayName() is a public const method. No null-deref or scope concerns.
  • No new flat AppSettings keys — auto-persisted via the existing LogCategory_* path. Good adherence to the settings convention.

One non-blocking note
Because aether.kiwisdr is a QtDebugMsg category, applyFilterRules() only ever toggles its .debug level — the new qCInfo(lcKiwiSdr) lifecycle messages (connect/disconnect/profile/slice/state) will keep printing even when a user unticks the KiwiSDR box; only the qCDebug lines actually go quiet. This is identical to how lcProtocol/lcConnection behave today, so it's a pre-existing codebase convention rather than a defect introduced here — just flagging it since the PR frames the category as a toggle. No change required.

Nice incremental improvement to the Support diagnostics. 👍


🤖 aethersdr-agent · cost: $1.2831 · model: claude-opus-4-8

@ten9876 ten9876 merged commit 0ba821b into main Jun 20, 2026
6 checks passed
@ten9876 ten9876 deleted the feat/kiwisdr-logging branch June 20, 2026 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant