github.com/alesr/redact

redact

Redact sensitive information from slog-based logs using a configurable pipeline.

51

Decision Signals

Health score 51/100, confidence 80/100.

Caution
Maintenance 45
Adoption 7
Security 92
Maturity 62
Developer DX 83
Confidence 80

Install

go get github.com/alesr/redact

Package Data

updated Jun 11, 2026
Latest versionv1.0.0
Imported by0 packages
Stars0
Forks0
Last activity1 years ago
Latest releaseUnknown
LicenseUnknown
Known vuln records0

API Surface

11 symbols
SymbolKindSynopsis
RedactionFunc Type type RedactionFunc func(ctx context.Context, r slog.Record) slog.Record
RedactionHandler Type type RedactionHandler struct{}
NewRedactionHandler Function func NewRedactionHandler(handler slog.Handler, pipeline *RedactionPipeline) *RedactionHandler
RedactionHandler.Enabled Method func (h *RedactionHandler) Enabled(ctx context.Context, level slog.Level) bool
RedactionHandler.Handle Method func (h *RedactionHandler) Handle(ctx context.Context, r slog.Record) error
RedactionHandler.WithAttrs Method func (h *RedactionHandler) WithAttrs(attrs []slog.Attr) slog.Handler
RedactionHandler.WithGroup Method func (h *RedactionHandler) WithGroup(name string) slog.Handler
RedactionPipeline Type type RedactionPipeline struct{}
NewRedactionPipeline Function func NewRedactionPipeline() *RedactionPipeline
RedactionPipeline.AddRedactField Method func (p *RedactionPipeline) AddRedactField(fieldName string)
RedactionPipeline.Process Method func (p *RedactionPipeline) Process(ctx context.Context, r slog.Record) slog.Record

Maintained Alternatives

limited recent repository activity

#1 slog-multi

🚨 Design workflows of slog handlers: pipeline, middleware, fanout, routing, failover, load balancing...

Go Logging Libraries 626 stars 237 imported-by 100% confidence
95

#2 Zerolog

Package zerolog provides a lightweight logging library dedicated to JSON logging.

Go Logging Libraries 12.4K stars 30.5K imported-by 100% confidence
94

#3 Zap

Package zap provides fast, structured, leveled logging.

Go Logging Libraries 24.5K stars 119.7K imported-by 65% confidence
92

#4 logger

Package logger defines the structured logging interface and a global default logger that components use when no explicit logger is configured.

Go Logging Libraries 55 stars 615 imported-by 95% confidence
86

#5 Logrus

Package logrus is a structured logger for Go, completely API compatible with the standard library logger.

Go Logging Libraries 25.7K stars 0 imported-by 65% confidence
86

#6 phuslu/log

Fastest structured logging

Go Logging Libraries 859 stars 0 imported-by 45% confidence
78

Similar Packages

Go Logging Libraries

#1 slog-multi

🚨 Design workflows of slog handlers: pipeline, middleware, fanout, routing, failover, load balancing...

Go Logging Libraries 626 stars 237 imported-by 100% confidence
95

#2 Zerolog

Package zerolog provides a lightweight logging library dedicated to JSON logging.

Go Logging Libraries 12.4K stars 30.5K imported-by 100% confidence
94

#3 Zap

Package zap provides fast, structured, leveled logging.

Go Logging Libraries 24.5K stars 119.7K imported-by 65% confidence
92

#4 logger

Package logger defines the structured logging interface and a global default logger that components use when no explicit logger is configured.

Go Logging Libraries 55 stars 615 imported-by 95% confidence
86

#5 Logrus

Package logrus is a structured logger for Go, completely API compatible with the standard library logger.

Go Logging Libraries 25.7K stars 0 imported-by 65% confidence
86