MCPcopy
hub / github.com/keploy/keploy / countingRedactor

Struct countingRedactor

utils/log/logger_test.go:196–200  ·  view source on GitHub ↗

countingRedactor counts how many times each redaction hook fires. Used to assert the redaction-once invariant — a single outer redactingCore should run RedactEntry/RedactField exactly once per log call, not 2x because of the tee.

Source from the content-addressed store, hash-verified

194// redactingCore should run RedactEntry/RedactField exactly once per
195// log call, not 2x because of the tee.
196type countingRedactor struct {
197 entries int64
198 fields int64
199 encoded int64
200}
201
202func (r *countingRedactor) RedactEntry(ent *zapcore.Entry) {
203 atomic.AddInt64(&r.entries, 1)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected