MCPcopy
hub / github.com/keploy/keploy / Redactor

Interface Redactor

utils/log/logger.go:38–42  ·  view source on GitHub ↗

Redactor rewrites log entries/fields in place to strip secrets before the underlying zap core writes them out. Implementations live outside this package (enterprise plugs in one that uses its secret detector) so OSS keploy stays free of product-specific redaction rules. There are two redaction hook

Source from the content-addressed store, hash-verified

36// Implementations MUST be safe for concurrent use — the methods are called
37// on the log hot path from any goroutine.
38type Redactor interface {
39 RedactEntry(ent *zapcore.Entry)
40 RedactField(f *zapcore.Field)
41 RedactEncoded(text string) string
42}
43
44// redactorHolder wraps Redactor so atomic.Value always stores the same
45// concrete type (atomic.Value panics on type changes across Stores).

Callers 4

WriteMethod · 0.65
WithMethod · 0.65
WriteMethod · 0.65
WriteMethod · 0.65

Implementers 1

countingRedactorutils/log/logger_test.go

Calls

no outgoing calls

Tested by

no test coverage detected