Documentation
¶
Overview ¶
Package stdlog provides a logger implementation using the standard library's slog package used as adapter for logging interfaces.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SlogLogger ¶
type SlogLogger struct {
// contains filtered or unexported fields
}
SlogLogger is the implementation of Logger using slog.
func NewLogger ¶
func NewLogger(logger *slog.Logger) *SlogLogger
NewLogger creates a new SlogLogger instance.
func (*SlogLogger) Errorf ¶
func (l *SlogLogger) Errorf(format string, args ...any)
Errorf logs error messages using slog's Error level.
func (*SlogLogger) Logf ¶
func (l *SlogLogger) Logf(format string, args ...any)
Logf logs informational messages using slog's Info level.
Click to show internal directories.
Click to hide internal directories.