Documentation ¶
Index ¶
- Constants
- Variables
- type Log
- func (l *Log) Debug(fmtString string)
- func (l *Log) Debugf(fmtString string, args ...interface{})
- func (l *Log) Error(fmtString string)
- func (l *Log) Errorf(fmtString string, args ...interface{})
- func (l *Log) Info(fmtString string)
- func (l *Log) Infof(fmtString string, args ...interface{})
- func (l *Log) NeedRedact(originalString string, regexP *regexp.Regexp) bool
- func (l *Log) Redact(fmtedString string) string
- func (l *Log) Warn(fmtString string)
- func (l *Log) Warnf(fmtString string, args ...interface{})
Constants ¶
View Source
const (
RedactValue = "XXXXXXXX"
)
Variables ¶
View Source
var RedactKeyList = []*regexp.Regexp{ regexp.MustCompile(`(\\?"password\\?":\\?")([^"]*)(\\?")`), regexp.MustCompile(`(\\?"additional_trust_bundle\\?":\\?")([^"]*)(\\?")`), regexp.MustCompile(`(-----BEGIN CERTIFICATE-----)([^-----]*)(-----END CERTIFICATE-----)`), regexp.MustCompile(`(password\s*=\s*)([^\n\\\n]+)([\n\\\n]+)`), regexp.MustCompile(`(aws_(billing)?_?account_id[\s]*=[\s\\]*"?)([0-9]{12})([\\"]*)`), regexp.MustCompile(`(arn:aws:[^:]*:[a-z0-9-]*:)([0-9]{12})([^\n\"\\]*)`), }
Functions ¶
This section is empty.
Types ¶
type Log ¶ added in v1.6.0
type Log struct {
// contains filtered or unexported fields
}
func (*Log) NeedRedact ¶ added in v1.6.0
Click to show internal directories.
Click to hide internal directories.