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

Switch to slog #201

Merged
merged 3 commits into from
Jan 6, 2024
Merged

Conversation

gabriel-samfira
Copy link
Member

This change switches GARM to the new log/slog structured logging library. This allows us to add contextual fields to log lines, generate json or text format logs, set log levels, etc.

This change is mostly mechanic, replacing instances of log.Print() and the badly writen r.log() from runner/pool with slog.

This change switches GARM to the new structured logging standard
library. This will allow us to set log levels and reduce some of
the log spam.

Given that we introduced new knobs to tweak logging, the number of
config options for logging now warrants it's own section.

Signed-off-by: Gabriel Adrian Samfira <[email protected]>
Pool managers will have 2 fields identifying which manager generated
the log line.

In the future, we will add tracking ids in various cases, allowing
us to track down issues faster.

Signed-off-by: Gabriel Adrian Samfira <[email protected]>
Signed-off-by: Gabriel Adrian Samfira <[email protected]>
@gabriel-samfira gabriel-samfira merged commit 0aaeebd into cloudbase:main Jan 6, 2024
4 checks passed
@gabriel-samfira gabriel-samfira deleted the switch-to-slog branch January 6, 2024 01:04
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