Skip to content
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

Change logging library to be consistent with FCM relay (and fix log levels) #6

Merged
merged 2 commits into from
Sep 11, 2024

Conversation

timetinytim
Copy link

Logs for this module are a little messy, and datadog has trouble parsing them. This uses the same library as the FCM relay does for logging, which has better support for adding fields to log messages, and setting the level of each log message in a way that things like datadog can pick them up.

Tested this locally to a certain extent, and it runs no problem. I didn't go as far as testing notifications, but since the only thing changes was logging, no functionality should be impacted, and logging messages seem to work.

@timetinytim timetinytim self-assigned this Sep 10, 2024
Copy link
Sponsor Member

@renchap renchap left a comment

Choose a reason for hiding this comment

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

Looks good.

I wanted to have a look at slog for this, as this is now part of the standard Go library, but that works as well.

@timetinytim
Copy link
Author

Oh interesting, looks like it does a lot of the same stuff. Let me put a pin in that, it would be nice to use a logging library that isn't an external dependency.

@timetinytim timetinytim merged commit 622b53d into master Sep 11, 2024
1 check passed
@timetinytim timetinytim deleted the fix-logging branch September 11, 2024 11:02
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