chore: include decoder in debug log (#1853)

This commit is contained in:
Richard Gomez authored and GitHub committed 2025-05-12 21:54:55 -05:00
1 parent 78eebaca9d
commit f97a9ee872
1 file changed
+10 -7
+10 -7
View File
@@ -2,6 +2,7 @@ package codec
import ( import (
"bytes" "bytes"
"github.com/zricethezav/gitleaks/v8/logging" "github.com/zricethezav/gitleaks/v8/logging"
) )
@@ -89,13 +90,15 @@ func (d *Decoder) findEncodedSegments(data string, predecessors []*EncodedSegmen
} }
segments = append(segments, segment) segments = append(segments, segment)
logging.Debug().Msgf( logging.Debug().
"segment found: original=%s pos=%s: %q -> %q", Str("decoder", m.encoding.kind.String()).
segment.original, Msgf(
segment.encoded, "segment found: original=%s pos=%s: %q -> %q",
encodedValue, segment.original,
segment.decodedValue, segment.encoded,
) encodedValue,
segment.decodedValue,
)
} }
return segments return segments