Skip to content

feat(log): name the process in every log line - #106

Merged
mrcsin merged 1 commit into
masterfrom
log-and-backlog
Oct 2, 2026
Merged

mrcsin merged 1 commit into
masterfrom
log-and-backlog

Conversation

@mrcsin

@mrcsin mrcsin commented Oct 2, 2026

Copy link
Copy Markdown
Member

Problem

Every window is its own process, and all of them write one shared log file. A line did not say which process wrote it, so the windows' lines could not be told apart. Group G (Tasks 15-18) of the window-per-process plan, its last group.

What changed

  • Program.cs: the template carries [{ProcessId}] after the timestamp, the logger enriches with Environment.ProcessId, and one constant names the property in both places. No package added.
  • overview.md, bench.md, readme.md: every window shares the log file; an event's first line carries the id; the file's own length decides the 5 MB roll and every process moves to the newest file at its first write after it fills (checked against the decompiled Serilog.Sinks.File 7.0.0).
  • backlog.md: "Platform audit leftovers", 12 entries, each against a file:line that holds on the tree; two stale bullets removed.
  • The plan's acceptance is verified across Groups A-G, and the plan moves to docs/plans/completed/.
  • Included on purpose, outside the log scope: PenEditorViewTests and PenGroupsViewTests clicked a control the refresh had not yet enabled when the pool thread lagged (reproduced under load); they now wait for IsEffectivelyEnabled. testing-strategy.md names HeadlessWait as the wait for that pool-to-dispatcher hop. Kept here because the flake puts this PR's CI at risk.

Verification

  • dotnet build SemiPlot.slnx: 0 warnings. Unit 1591/1591, integration 138/138.
  • Acceptance Evidence greps 4-6 and the backlog grep print nothing; the 16 named tests pass.
  • Demo stand: every log line carries [<pid>], five process ids seen in one file. Smoke step 8 (database stop and restart) needs converge re-run on this stand, because a container restarted from the Aspire dashboard is recreated without semiplot_app; the viewer reported exactly that.
Per-task commits before collapse
2695b69 docs(plans): count the backlog entries that landed
97cc9d9 docs(plans): record the log-and-backlog run
b6deb6c refactor(log): address smells findings
9cf5221 test(pen-editor): wait for the refresh to enable input
2fffa59 docs(repo): address review findings
79dbb07 docs(plans): resolve the final doc sweep
39edb53 docs(plans): record acceptance verification
c175c90 docs(plans): move audit leftovers to backlog
c90000a feat(log): name the process in every log line

https://claude.ai/code/session_01PfZJa7neMMKPzycFR6iuhD

Every window is its own process, and all of them write one shared log
file. A line did not say which process wrote it, so the windows' lines
could not be told apart.

The log template carries [{ProcessId}] after the timestamp, and the
logger enriches every event with Environment.ProcessId; one constant
names the property in both places. An event's first line carries the
id and its other lines follow it unbroken. overview.md, bench.md and
readme.md state how the shared file rolls: its own length decides the
5 MB roll, and every process moves to the newest file at its first
write after the file is full.

This closes the window-per-process plan. backlog.md records the
platform audit's leftovers, each against a file:line that holds on the
tree, the plan's acceptance is verified across all its groups, and the
plan moves to docs/plans/completed/.

Two pen-editor view tests clicked a control the refresh had not yet
enabled when the pool thread was slow; they now wait for it.
testing-strategy.md names HeadlessWait as the wait for that hop.

Claude-Session: https://claude.ai/code/session_01PfZJa7neMMKPzycFR6iuhD
@mrcsin
mrcsin marked this pull request as ready for review October 2, 2026 13:29
@mrcsin
mrcsin merged commit 122e6c2 into master Oct 2, 2026
2 checks passed
@mrcsin
mrcsin deleted the log-and-backlog branch October 2, 2026 13:33
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