printer: always flush when logging messages
Metadata
Current evaluation
Merged PR #163 (commit 659cac9) by tigarmo makes Printer._log() call self.log.flush() after every write to the logfile, matching stdlib FileHandler behaviour and preventing lost messages from multiprocessing child processes (CRAFT-1856).
Resolution: closed resolved
Reason: The PR was approved and merged into main as commit 659cac9 ('printer: always flush when logging messages (#163)'). craft_cli/printer.py now flushes the log handle at the end of _log(), with the flush still present in current HEAD.
Evaluated by: mr-cal-bot
No scores available.
Issue body
With this commit, every write() call to the Printer's logfile is
followed by an explicit call to flush(). This is in line with the
standard library's FileHandler behavior, and lets us correctly write
to file messages logged from child processes (multiprocessing). Without
this, the files are written() to but the child process dies without
flushing them to disk, so they are lost.
CRAFT-1856
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #163 (commit 659cac9) by tigarmo makes Printer._log() call self.log.flush() after every write to the logfile, matching stdlib FileHandler behaviour and preventing lost messages from multiprocessing child processes (CRAFT-1856). | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/craft-cli#163 (commit 659cac9), adding flush() after every Printer log write so messages from multiprocessing children reach disk before exit. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged to main. Adds explicit flush() after every write() to the Printer's logfile, matching standard FileHandler behavior. Fixes CRAFT-1856 by preventing lost logs from multiprocessing child processes. Approved, passed CI, 100% diff coverage. |
Update history
No update history recorded yet.
Related work
-
Related To:
craft-cli#167
(confidence 15%)
No direct link; subsequent printer changes (#166, #185, #339, #443, #445) iterate on the same file without altering the flush behaviour.
Related issues
No related issues found above the similarity threshold.