From af4e7ea471e8025fcc7396657b86ab0442b6156a Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Sat, 11 Jul 2026 12:10:34 +0200 Subject: [PATCH] docs: update README logging section for logging-module migration The write-up still described the old print()-mirroring behavior; recent commits (a1864a5..9f262c4) routed task/component output through self.log (stdlib logging) instead, added Sud lifecycle/connect-state log lines, and gave SudForecastEstimator its own silenced logger. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01F4oEE99rkKVU8L8tkzXWdG --- README.md | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index eee2c72..090beee 100644 --- a/README.md +++ b/README.md @@ -771,10 +771,27 @@ session - don't assume they're a matched pair unless you've just watched a run finish (`log_latest_sud.json` is only ever current *immediately* after a `Stop`/`DONE`). -`server/brewpi.py` also mirrors everything it prints (every component's -`print()`-based status/debug output) to a plain text log, -`logs/brewpi..log`, alongside those JSON logs - useful for -post-mortems without needing to have been watching the console live. +`server/brewpi.py` also mirrors console output to a plain text log, +`logs/brewpi..log` (plus an always-truncated `logs/brewpi.latest.log` +for tail-style consumers), alongside those JSON logs - useful for post-mortems +without needing to have been watching the console live. Every task/component +logs through the stdlib `logging` module rather than `print()`: `AttributeChange` +(`utils/value.py`, the common base of every `ATask` and component ABC) gives +each one a `self.log = logging.getLogger(type(self).__name__)`, so messages +are automatically tagged with the component's class name with no hand-typing +needed. `server/brewpi.py`'s `Tee` class mirrors `stdout`/`stderr` to both log +files and stamps each line with a `T