Skip to content

Commit

Permalink
Merge pull request #642 from Juliusan/logging
Browse files Browse the repository at this point in the history
Logger name should be logged in Logf too
  • Loading branch information
muXxer authored Feb 12, 2024
2 parents 9caf791 + ee53b5c commit c0bb6cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion log/logger_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func (l *logger) Log(msg string, level Level, args ...any) {
// Logf emits a formatted log message with the given level.
func (l *logger) Logf(fmtString string, level Level, args ...any) {
if l != nil && l.level.Level() <= level {
l.rootLogger.LogAttrs(context.Background(), level, fmt.Sprintf(fmtString, args...))
l.rootLogger.LogAttrs(context.Background(), level, fmt.Sprintf(fmtString, args...), slog.Attr{Key: namespaceKey, Value: slog.StringValue(l.path)})
}
}

Expand Down

0 comments on commit c0bb6cb

Please sign in to comment.