- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for NewSlogLogger (0.06 sec)
-
logger/slog_test.go
"context" "log/slog" "strings" "testing" "time" ) func TestSlogLogger(t *testing.T) { buf := &bytes.Buffer{} handler := slog.NewTextHandler(buf, &slog.HandlerOptions{AddSource: true}) logger := NewSlogLogger(slog.New(handler), Config{LogLevel: Info}) logger.Trace(context.Background(), time.Now(), func() (string, int64) { return "select count(*) from users", 0 }, nil)
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Thu Oct 30 10:56:26 UTC 2025 - 782 bytes - Viewed (0) -
logger/slog.go
LogLevel LogLevel SlowThreshold time.Duration Parameterized bool Colorful bool // Ignored in slog IgnoreRecordNotFoundError bool } func NewSlogLogger(logger *slog.Logger, config Config) Interface { return &slogLogger{ Logger: logger, LogLevel: config.LogLevel, SlowThreshold: config.SlowThreshold,Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Thu Oct 30 10:56:26 UTC 2025 - 2.9K bytes - Viewed (0)