logger: fixes
Some checks failed
/ autoupdate (push) Failing after 1m16s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2024-03-04 22:22:05 +03:00
parent 7050313bc1
commit 1cbc353479
2 changed files with 9 additions and 1 deletions

View File

@ -45,6 +45,10 @@ func (l *noopLogger) Options() Options {
return l.opts
}
func (l *noopLogger) Name() string {
return l.opts.Name
}
func (l *noopLogger) String() string {
return "noop"
}

View File

@ -113,7 +113,7 @@ func (s *slogLogger) Attrs(attrs ...interface{}) logger.Logger {
handleOpt := &slog.HandlerOptions{
ReplaceAttr: nl.renameAttr,
Level: s.leveler,
Level: nl.leveler,
AddSource: true,
}
@ -261,6 +261,10 @@ func (s *slogLogger) Warn(ctx context.Context, msg string, attrs ...interface{})
_ = s.slog.Handler().Handle(ctx, r)
}
func (s *slogLogger) Name() string {
return s.opts.Name
}
func (s *slogLogger) String() string {
return "slog"
}