Skip to content

Log to a file in tray mode, with an "Open log" menu item - #7

Merged
rhaist merged 1 commit into
mainfrom
tray-log
Nov 9, 2026
Merged

rhaist merged 1 commit into
mainfrom
tray-log

Conversation

@rhaist

@rhaist rhaist commented Nov 9, 2026

Copy link
Copy Markdown
Owner

In tray mode podbeam detaches from the console, so everything it printed (status lines, errors, panics) was lost. Only the last status line was visible, in the menu.

  • Log file: the tray now redirects stdout/stderr to %LOCALAPPDATA%\podbeam\podbeam.log. Once the file passes 1 MB it's moved to podbeam.log.1 at startup, so the previous run survives one restart. Panic messages land there too, because Rust's Windows stdio calls GetStdHandle on every write (checked in std).
  • "Open log": a new tray menu item opens the file with the default app for .log files.
  • One log() function: every message goes through it, with a UTC timestamp (2026-11-09T13:53:07Z) on the command line too. The date formatting is ~15 lines with a test, so no new dependency.
  • README: covers the log location.

The first line of each run is podbeam <version> started.

Not tested: the file redirect itself, because it would also redirect the test runner's output. That part only builds and passes clippy on Windows (-D warnings).


Generated by Claude Code

The tray detaches from the console, so everything podbeam printed was
lost. It now points stdout/stderr at %LOCALAPPDATA%\podbeam\podbeam.log
(moved to podbeam.log.1 once it passes 1 MB), so status lines, errors
and panic messages all land there. Every message goes through one log()
function and carries a UTC timestamp, on the command line too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0153Jh6SvWis1QdJPf8i76cv
@rhaist
rhaist merged commit 5c96e81 into main Nov 9, 2026
5 checks passed
@rhaist
rhaist deleted the tray-log branch November 9, 2026 13:59
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