Skip to content

fix(cli): Linux service points at its journal for logs - #102

Merged
vkpdeveloper merged 1 commit into
mainfrom
fix/linux-service-logs
Nov 25, 2026
Merged

vkpdeveloper merged 1 commit into
mainfrom
fix/linux-service-logs

Conversation

@vkpdeveloper

@vkpdeveloper vkpdeveloper commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Problem

On Linux, systemd keeps the background service's output in the journal. vmbridge service install still said Logs: ~/.vmbridge/vmbridge.log, a file that never exists there. For the same reason, running vmbridge in a terminal while the service ran listed no addresses.

Solution

Each service manager says where its output lives and reads it: launchd keeps the log file, systemd uses journalctl --user -u vmbridge.

Validation

  • bun run typecheck, bun test apps/cli.
  • Ubuntu 24.04 container with systemd: service install prints Logs: journalctl --user -u vmbridge, and vmbridge in a terminal lists the service's address.
  • macOS with the real launchd service: the terminal notice still lists its addresses from the log file.

Summary by CodeRabbit

  • New Features
    • The CLI now displays the background service’s addresses from its reported output and shows where service logs can be found after installation.
    • Service output is available across supported platforms, including recent service activity on Linux and log contents on macOS.

On Linux, systemd keeps the service's output in the journal, but
`vmbridge service install` pointed at ~/.vmbridge/vmbridge.log, which
never exists there. For the same reason, `vmbridge` in a terminal listed
no addresses for the running service. Both now read the journal on Linux.
@vercel

vercel Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
vmbridge Skipped Skipped Nov 25, 2026 8:51pm UTC

@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

Walkthrough

The service implementations now expose output and log-location methods. The CLI uses these methods to read output for background notices and to report the service log location during installation.

Changes: Service output access

Layer / File(s) Summary
Platform output methods
apps/cli/src/service.ts
macOS returns the UTF-8 log contents or an empty string if the log is absent. Linux returns up to 200 lines from the user service journal. Unsupported services return empty strings. The service also provides a platform-specific log location.
CLI service integration
apps/cli/src/index.ts
backgroundNotice reads output through service.output(). The install confirmation uses service.logLocation().

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: Low · up to 852a3

On Linux, the terminal notice can omit the service address after heavy logging, briefly show a previous run's address after a restart, or fail before the stop instruction on hosts without journalctl. The service itself keeps running, so these are bounded issues worth fixing or accepting before merge.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@vkpdeveloper
vkpdeveloper merged commit f726c99 into main Nov 25, 2026
3 of 4 checks passed
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