Skip to content

fix(service): keep companion logs out of ~/Library on Linux - #399

Open
cbyrd01 wants to merge 1 commit into
google:mainfrom
cbyrd01:fix/linux-companion-log-dir
Open

cbyrd01 wants to merge 1 commit into
google:mainfrom
cbyrd01:fix/linux-companion-log-dir

Conversation

@cbyrd01

@cbyrd01 cbyrd01 commented Nov 10, 2026 •

Copy link
Copy Markdown

spawn_companions wrote gateway.log and tray.log to $HOME/Library/Logs/capsem on every platform. That is the macOS per-user log location. On Linux it creates a stray ~/Library directory, separate from the service's own logs in ~/.capsem/logs.

The directory is now resolved in companion_log_dir: unchanged on macOS and under an isolated CAPSEM_RUN_DIR, capsem_logs_dir() everywhere else.

Tests. Two new unit tests in service_runtime/tests.rs. The Linux one failed before the change (left: ~/Library/Logs/capsem, right: ~/.capsem/logs) and passes after.

cargo test -p capsem-service --bin capsem-service companion_logs

Not changed. capsem uninstall still removes ~/Library/Logs/capsem if present, which also cleans up directories earlier versions left on Linux.

🤖 Generated with Claude Code

spawn_companions wrote gateway.log and tray.log to
$HOME/Library/Logs/capsem on every platform. That is the macOS per-user
log location; on Linux it created a stray ~/Library directory, apart
from the service's own logs in ~/.capsem/logs.

Resolve the directory in companion_log_dir: unchanged on macOS and under
an isolated CAPSEM_RUN_DIR, capsem_logs_dir() everywhere else.
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