Write at-terminal.log as the house's standard line through logline (AHT-204) #38

Merged
merge-queue merged 1 commit from aht-204-logline into main 2026-11-26 04:27:48 -08:00
Owner

Moves at-terminal.log onto the house's one log line, written by the logline crate (https://openproject.home.romaine.life/wp/AHT-204).

Before: frontends/rioterm/src/atlog.rs wrote <UTC time to the second>Z <fixed words> itself, with values inside the words (single instance lock failed with error 5). A start kept the file's newer half once it passed 1 MiB.

After: 2026-11-26T10:30:43.123-08:00 pid=4242 warn single instance failed step=lock error=5. That is local time with milliseconds and its zone, the pid, the level, a fixed message, then fields. The file moves to at-terminal.log.old past 1 MiB (logline's rotation).

  • Events and levels: start version= (info), program name= / program default shell (info), program ended status= / program ended without a status (info), exit (info), crash file= line= (error), previous run ended without saying how (warn), single instance failed step= error= (warn for lock and pipe, which go on, error for summon), offscreen window for window-shot (info), offscreen refused (error; the console still gets the usage sentence).
  • What can reach the log is unchanged: fixed words, numbers, and names cut to letters, digits and ._-. holds_only_fixed_words now checks each parsed line's message and fields.
  • The check for a run that ended without saying how now reads the last line's parsed message. A last line in the old form can't say how its run ended, so the first start after this update doesn't count it against that run.
  • Removed: the hand-written UTC timestamp, civil_from_days and keep_newer_half.

Left as it is: Rio's own tracing setup in frontends/rioterm/src/main.rs (setup_logs_by_filter_level). It logs to stdout, and to log/rio.log only with enable_log_file or --enable-log-file. It is upstream's debug log, isn't turned on in what ships, and isn't one of the house's logs. rio-window's examples set up tracing too, and they aren't shipped either.

Tests: the atlog tests write through a temporary logline::Logger and parse every line with logline::parse. New: a log ending in an old-form line isn't counted against its run. The first ci-check run on this branch failed once in the Windows cargo test step; the run kept no detail of which test. A rerun of ci-check and a full local cargo test --workspace both passed.

The dependency is logline = { git = "https://forgejo.romaine.life/romaine-life/logline", tag = "v0.1.0" }.

🤖 Generated with Claude Code

Moves `at-terminal.log` onto the house's one log line, written by the `logline` crate (https://openproject.home.romaine.life/wp/AHT-204). **Before:** `frontends/rioterm/src/atlog.rs` wrote `<UTC time to the second>Z <fixed words>` itself, with values inside the words (`single instance lock failed with error 5`). A start kept the file's newer half once it passed 1 MiB. **After:** `2026-11-26T10:30:43.123-08:00 pid=4242 warn single instance failed step=lock error=5`. That is local time with milliseconds and its zone, the pid, the level, a fixed message, then fields. The file moves to `at-terminal.log.old` past 1 MiB (logline's rotation). - Events and levels: `start version=` (info), `program name=` / `program default shell` (info), `program ended status=` / `program ended without a status` (info), `exit` (info), `crash file= line=` (error), `previous run ended without saying how` (warn), `single instance failed step= error=` (warn for lock and pipe, which go on, error for summon), `offscreen window for window-shot` (info), `offscreen refused` (error; the console still gets the usage sentence). - What can reach the log is unchanged: fixed words, numbers, and names cut to letters, digits and `._-`. `holds_only_fixed_words` now checks each parsed line's message and fields. - The check for a run that ended without saying how now reads the last line's parsed message. A last line in the old form can't say how its run ended, so the first start after this update doesn't count it against that run. - Removed: the hand-written UTC timestamp, `civil_from_days` and `keep_newer_half`. **Left as it is:** Rio's own `tracing` setup in `frontends/rioterm/src/main.rs` (`setup_logs_by_filter_level`). It logs to stdout, and to `log/rio.log` only with `enable_log_file` or `--enable-log-file`. It is upstream's debug log, isn't turned on in what ships, and isn't one of the house's logs. `rio-window`'s examples set up tracing too, and they aren't shipped either. **Tests:** the `atlog` tests write through a temporary `logline::Logger` and parse every line with `logline::parse`. New: a log ending in an old-form line isn't counted against its run. The first `ci-check` run on this branch failed once in the Windows `cargo test` step; the run kept no detail of which test. A rerun of `ci-check` and a full local `cargo test --workspace` both passed. The dependency is `logline = { git = "https://forgejo.romaine.life/romaine-life/logline", tag = "v0.1.0" }`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Write at-terminal.log as the house's standard line through logline (AHT-204)
All checks were successful
Suite release / module (pull_request) Has been skipped
Suite rust / check-format (pull_request) Successful in 9s
Suite default / scope (pull_request) Successful in 9s
Suite rust / scope (pull_request) Successful in 9s
Suite rust / check-machete (pull_request) Has been skipped
Suite release / scope (pull_request) Successful in 10s
Suite release / home-sync (push) Has been skipped
Suite release / publish (push) Has been skipped
Suite release / dispatch (push) Has been skipped
Suite release / deploy-image (push) Has been skipped
Suite rust / check-services (pull_request) Has been skipped
Suite release / home-sync (pull_request) Has been skipped
Suite release / publish (pull_request) Has been skipped
Suite default / check-rules (pull_request) Has been skipped
Suite rust / check-typos (pull_request) Has been skipped
Suite rust / check-audit (pull_request) Has been skipped
Suite rust / reused-checks (pull_request) Successful in 11s
Suite release / reserve (pull_request) Has been skipped
Suite release / build (rust, x86_64-pc-windows-msvc) (, rust-x86_64-pc-windows-msvc, x86_64-pc-windows-msvc, false, windows-latest, x86_64-pc-windows-msvc, rust) (pull_request) Has been skipped
Suite default / reused-checks (pull_request) Successful in 7s
Suite rust / check-test-linux (pull_request) Successful in 1m57s
Suite rust / check-test-windows (pull_request) Successful in 4m12s
Suite release / check-build (rust, x86_64-pc-windows-msvc) (, rust-x86_64-pc-windows-msvc, x86_64-pc-windows-msvc, false, windows-latest, x86_64-pc-windows-msvc, rust) (pull_request) Successful in 8m33s
merge-queue landed on main
Suite release / finalize (pull_request) Has been skipped
Suite release / dispatch (pull_request) Has been skipped
Suite release / deploy-image (pull_request) Has been skipped
Suite default / check-fetches (pull_request) Successful in 6s
Suite release / check-package (pull_request) Successful in 6s
Suite release / reused-checks (pull_request) Successful in 4s
38f673e3e5
atlog.rs writes through logline: RFC 3339 local time with milliseconds and
zone (was UTC Z to the second), pid, level, a fixed message and fields (was
fixed words with values inside them), rotation to at-terminal.log.old past
1 MiB (was keeping the newer half). What can reach the log is unchanged: fixed
words, numbers and names cut to letters, digits and ._-.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
merge-queue deleted branch aht-204-logline 2026-11-26 04:27:49 -08:00
Sign in to join this conversation.
No reviewers
No labels
queue
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
romaine-life/at-terminal!38
No description provided.