-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
use log/slog for structured logging #3502
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @seankhliao, I really appreciate you tackling this.
I'm mostly satisfied with how things look. I made a few comments, curious what you think.
a5a5908
to
45e201f
Compare
Signed-off-by: Sean Liao <sean+git@liao.dev>
i rebased to resolve a conflict with new additions to the google connector |
@sagikazarmark from my point of view, looks good enough to be merged. Anything else from your side? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks @seankhliao
Overview
Switches pkg/log and logrus for the standard library's slog logger.
What this PR does / why we need it
This is more or less a mechanical replacement of the internal
log.Logger
interface andlogrus
logger with the standard library's slog.This appears to be the general community consensus on a standard logging interface, where slog.Logger is used as the common interface, and implementations can switch out the
slog.Handler
if necessary.Connectors have their type and id added as attributes.
Log lines are lowercased for consistency.
Closes #2020
Special notes for your reviewer
If dex is used as a library, this will be a breaking change.
Log line output will be different from before.