Skip to content

feat: add logging to App #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

feat: add logging to App #78

wants to merge 2 commits into from

Conversation

spikecurtis
Copy link
Collaborator

@spikecurtis spikecurtis commented Apr 24, 2025

Adds logging to the Coder Desktop application.

Copy link
Collaborator Author

spikecurtis commented Apr 24, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@spikecurtis spikecurtis marked this pull request as ready for review April 24, 2025 12:06
Comment on lines +36 to +40
private const string ConfigSubKey = @"SOFTWARE\Coder Desktop\App";
private const string logFilename = "app.log";
#else
private const string MutagenControllerConfigSection = "DebugAppMutagenController";
private const string ConfigSubKey = @"SOFTWARE\Coder Desktop\DebugApp";
private const string logFilename = "debug-app.log";
Copy link
Member

Choose a reason for hiding this comment

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

Can these just be Coder Desktop and Coder Desktop Debug or something instead, rather than changing the existing key?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We can do Coder Desktop Debug\App instead of Coder Desktop\DebugApp --- but I do want App to be its own key to keep it distinct from the VPN service. Things like Serilog have defined config they understand, and I think we will want to have separate control over the app and the VPN service.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I didn't put two and two together about the serilog stuff, so your way is better. I don't particularly mind what key we use then, but the service keys should probably be fixed in this PR too to match the new format

Copy link
Member

@deansheather deansheather Apr 28, 2025

Choose a reason for hiding this comment

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

Any log configuration for the app should go in HKEY_CURRENT_USER though IMO

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The Mutagen binary path still kinda needs to live in HKLM, since it's set by the installer. I've made it so that it starts with default config, hardcoded into the app, then checks HKLM, then HKCU.

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