Documentation
¶
Index ¶
- func SanitizeError(err error) error
- func SanitizeText(raw string) string
- func SanitizeURL(raw string) string
- type Level
- type Logger
- func (l *Logger) Debugf(format string, a ...any)
- func (l *Logger) Enabled(v Level) bool
- func (l *Logger) Errorf(format string, a ...any)
- func (l *Logger) Infof(format string, a ...any)
- func (l *Logger) Warnf(format string, a ...any)
- func (l *Logger) WarnfThrottled(key string, window time.Duration, format string, a ...any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SanitizeError ¶ added in v0.6.2
SanitizeError returns an error with sensitive text redacted while preserving nil.
func SanitizeText ¶ added in v0.6.2
SanitizeText redacts bearer tokens and sanitizes HTTP URLs embedded in log text.
func SanitizeURL ¶
SanitizeURL removes userinfo and query params for logging to avoid leaking secrets. Returns the URL without userinfo and query, preserving scheme, host, and path.
Types ¶
Click to show internal directories.
Click to hide internal directories.