Repository navigation
[Ported] feat(sensor): add --log-level/--quiet and log observer and CLI output - #142
Merged
Merged
Conversation
v314b0i
added this pull request to stack #141
September 27, 2026 22:18
barisozbas
force-pushed
the
port/logger-observer-cli
branch
from
September 28, 2026 07:47
57e1706 to
ebcedd6
Compare
barisozbas
previously approved these changes
Sep 28, 2026
barisozbas
removed this pull request from stack #141
September 29, 2026 11:13
Expose the sensor logger's console threshold on the CLI:
--log-level {debug,info,warning,error} (default info) and -q/--quiet,
which is shorthand for --log-level warning. The two are mutually
exclusive. Nothing logs through the sensor logger yet, so output is
unchanged until call sites move over.
… the sensor logger
Replace the observer's progress and error print() calls with leveled
records on the adr_sensor.observer logger, tagged with a parse or save
phase. At the default level the text on the console is unchanged.
- progress ("Ingesting ...", "Saved session ...") is INFO on stdout
- a failed source or failed session save is ERROR and now goes to stderr
- recoverable cleanup and comparison problems are WARNING on stderr
display_summary() is report output rather than logging and keeps print().
…sensor logger Replace the CLI's print() calls with records on the adr_sensor.cli logger. Progress and the completion line are INFO on stdout; export and checkpoint failures stay on stderr as ERROR, and the checkpoint-retry notice as WARNING. "Completed with errors" is now a WARNING, so it goes to stderr and still shows with --quiet.
Emit the "Unable to write sensor diagnostics" notice as a WARNING on the adr_sensor.diagnostics logger instead of printing to stderr. It still reaches stderr once per run and still carries no exception text.
Describe --log-level and -q/--quiet in the README CLI usage section, including where progress and errors are printed and that the ingestion summary is always shown.
v314b0i
force-pushed
the
port/logger-observer-cli
branch
from
September 29, 2026 12:20
3950b56 to
beb9f3d
Compare
v314b0i
added this pull request to stack #148
September 29, 2026 12:25
barisozbas
approved these changes
Sep 29, 2026
barisozbas
approved these changes
Sep 29, 2026
atovkes
approved these changes
Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this? (check all applicable)
Related issue: N/A
What changed? (consolidates the remaining logging stack from #142, #143, and #144; targets
main)feat:--log-level {debug,info,warning,error}(defaultinfo) and-q/--quiet(same aswarning). The two are mutually exclusive.refactor: observer progress is INFO. A failed source or session save is ERROR, and recoverable cleanup and comparison problems are WARNING, tagged withphase(parse/save).refactor: CLI progress is INFO. OTLP export and checkpoint failures are ERROR, and the checkpoint-retry notice and "completed with errors" are WARNING.refactor: the diagnostics write-failure notice is a WARNING. It is still shown once and still carries no exception text.docs: the README CLI usage section.refactor: includes [Ported] refactor(sensor): route parser output through the sensor logger #143's parser logging across all ten capture sources and the updated CONTRIBUTING parser template.feat: includes [Ported] feat(sensor): add an opt-in persistent runtime log #144's opt-in rotating runtime JSONL logs via--log-file, with--log-file-content-freeand--log-identityoptions, tests, and documentation.#139 and #140 are already merged into
main. The consolidation preserves all commits from #142, #143, and #144 and reconciles the squash-merge ancestry of #140. The resolved source tree is identical to #144's complete stack atf8d95745b76b399cb15d848bc41bc143a10523c0.display_summary()is report output and still usesprint(), so the summary table always shows.Why?
Scheduled runs want quiet output but still want to see problems. Errors printed to stdout were easy to miss or lose in redirected logs.
How did you test it?
-qtogether with--log-level, observer progress on stdout and errors on stderr, a quiet run hiding progress but keeping the summary and warnings, and the existing capsys tests (one now reads stderr).pytest tests/ -qandruff check adr_sensor/.uvand the frozen lockfile on macOS.ruff check adr_sensor/,uv build, and pre-push validation passed.mainare ancestors of the consolidation commit, and that the final tracked files match [Ported] feat(sensor): add an opt-in persistent runtime log #144 exactly.Potential risks
Some messages move from stdout to stderr:
Error ingesting ...Error saving session ...completed with errorsScripts that grep stdout for them need
2>&1. At the default level the text is unchanged.With
--log-file, persisted messages and tracebacks can contain local paths and error text;--log-file-content-freeomits them. Runtime files and identity recording remain opt-in.