package log import ( "errors" "log/slog" "testing" ) func Test_SlogLogger(t *testing.T) { UseSlogAuditLogger(slog.Default()) t.Run("debug", func(t *testing.T) { AuditLogger.Debug("debug message") }) t.Run("debug with error details", func(t *testing.T) { AuditLogger.Debug("debug message", errors.New("custom error")) }) t.Run("info", func(t *testing.T) { AuditLogger.Info("info message") }) t.Run("info with error details", func(t *testing.T) { AuditLogger.Info("info message", errors.New("custom error")) }) t.Run("warn", func(t *testing.T) { AuditLogger.Warn("warn message") }) t.Run("warn with error details", func(t *testing.T) { AuditLogger.Warn("warn message", errors.New("custom error")) }) t.Run("error", func(t *testing.T) { AuditLogger.Error("error message") }) t.Run("error with error details", func(t *testing.T) { AuditLogger.Error("error message", errors.New("custom error")) }) }