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

fix: use loggerWrapper instead of defaultLoggerWrapper in Debug #66

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

sreeram-narayanan
Copy link
Contributor

@sreeram-narayanan sreeram-narayanan commented Feb 28, 2024

  • loggerWrapper.Debug was incorrectly using defaultLoggerWrapper instead of the defined wrapper. Due to this, Debug slogs did not have the custom fields.

@sreeram-narayanan sreeram-narayanan self-assigned this Feb 28, 2024
@@ -82,7 +82,7 @@

// Debug logs a line with level debug using a loggerWrapper instance.
func (l *loggerWrapper) Debug(msg string, args ...any) {
level.Debug(log.With(defaultLoggerWrapper.logger, defaultMsgKey, msg)).Log(args...)
level.Debug(log.With(l.logger, defaultMsgKey, msg)).Log(args...)

Check warning

Code scanning / gosec

Errors unhandled. Warning

Errors unhandled.
@ydlamba ydlamba self-requested a review February 28, 2024 13:53
@ydlamba ydlamba merged commit cb8cee3 into master Feb 28, 2024
3 checks passed
@sreeram-narayanan sreeram-narayanan deleted the bug-fix-slogger-debug branch February 28, 2024 13:58
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