Skip to content

feat(gui-client): configure IPC service to log to stdout#8219

Merged
thomaseizinger merged 6 commits into
mainfrom
feat/ipc-service-stdout-logging
Feb 23, 2025
Merged

feat(gui-client): configure IPC service to log to stdout#8219
thomaseizinger merged 6 commits into
mainfrom
feat/ipc-service-stdout-logging

Conversation

@thomaseizinger
Copy link
Copy Markdown
Member

@thomaseizinger thomaseizinger commented Feb 21, 2025

On Linux, logs sent to stdout from a systemd-service are automatically captured by journald. This is where most admins expect logs to be and frankly, doing any kind of debugging of Firezone is much easier if you can do journalctl -efu firezone-client-ipc.service in a terminal and check what the IPC service is doing.

On Windows, stdout from a service is (unfortunately) ignored.

To achieve this and also allow dynamically changing the log-filter, I had to introduce a (long-overdue) abstraction over tracing's "reload" layer that allows us to combine multiple reload-handles into one. Unfortunately, neither the reload::Layer nor the reload::Handle implement Clone, which makes this unnecessarily difficult.

Related: #8173

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
firezone ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 23, 2025 0:09am

@thomaseizinger
Copy link
Copy Markdown
Member Author

cc @oddlama

@thomaseizinger
Copy link
Copy Markdown
Member Author

Tested in Linux VM, works as intended.

Copy link
Copy Markdown
Member

@jamilbk jamilbk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this log to journald and log file still? If not, probably want to update /kb/client-apps/linux-gui-client and /kb/administer/logs docs.

@thomaseizinger
Copy link
Copy Markdown
Member Author

Does this log to journald and log file still? If not, probably want to update /kb/client-apps/linux-gui-client and /kb/administer/logs docs.

Logs to stdout in addition now. I can update the docs to reflect that.

@thomaseizinger
Copy link
Copy Markdown
Member Author

It would be nice to remove the logging to a file but then we'd have to integrate with journald for the log export. Honestly, that might actually be easier than writing the logs ourselves to a file and zip that.

Copy link
Copy Markdown
Member

@jamilbk jamilbk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How we do it for Android & Apple is log to file and then also the platform idiomatic log sink, so this seems like a step closer to that.

I think the Windows event viewer is a common sink too

@thomaseizinger thomaseizinger added this pull request to the merge queue Feb 23, 2025
Merged via the queue into main with commit f882edb Feb 23, 2025
@thomaseizinger thomaseizinger deleted the feat/ipc-service-stdout-logging branch February 23, 2025 00:40
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.

2 participants