log

package
v1.2.40-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RedactValue = "*************"
)

Variables

View Source
var RedactKeyList = []*regexp.Regexp{
	regexp.MustCompile(`(\\?"password\\?":\\?")([^"]*)(\\?")`),
	regexp.MustCompile(`(\\?"additional_trust_bundle\\?":\\?")([^"]*)(\\?")`),
	regexp.MustCompile(`(-----BEGIN CERTIFICATE-----\n)([^-----]*)(-----END CERTIFICATE-----)`),
	regexp.MustCompile(`(--password\s+)([^\n\t\\\s]+)([\n\\\s]*)`),
	regexp.MustCompile(`(--client-id\s+)([^\n\t\\\s]+)([\n\\\s]*)`),
	regexp.MustCompile(`(--bind-password\s+)([^\n\t\\\s]+)([\n\\\s]*)`),
	regexp.MustCompile(`(--client-secret\s+)([^\n\t\\\s]+)([\n\\\s]*)`),
	regexp.MustCompile(`(--users\s+[a-zA-Z0-9-]+:)([^\s\n\\]+)([\s\S]+)`),
	regexp.MustCompile(`(--cluster-admin-password\s+)([^\n\t\\\s]+)([\n\\\s]*)`),
	regexp.MustCompile(`(--billing-account\s+)([^\n\t\\\s]+)([\n\\\s]*)`),
	regexp.MustCompile(`(arn:aws:[a-z]+:[a-z0-9-]*:)([0-9]{12})(:)`),
	regexp.MustCompile(`(AWS Account:\s*)([0-9]{12})([\n\\n].)`),
	regexp.MustCompile(`(AWS Billing Account:\s*)([0-9]{12})([\n\\n].)`),
}

Functions

This section is empty.

Types

type Log

type Log struct {
	// contains filtered or unexported fields
}
var Logger *Log = GetLogger()

func GetLogger

func GetLogger() *Log

func (*Log) Debug

func (l *Log) Debug(fmtString string)

func (*Log) Debugf

func (l *Log) Debugf(fmtString string, args ...interface{})

func (*Log) DecorateLog added in v1.2.40

func (l *Log) DecorateLog(level string, message string) string

func (*Log) Error

func (l *Log) Error(fmtString string)

func (*Log) Errorf

func (l *Log) Errorf(fmtString string, args ...interface{})

func (*Log) Fatal added in v1.2.40

func (l *Log) Fatal(fmtString string)

func (*Log) Info

func (l *Log) Info(fmtString string)

func (*Log) Infof

func (l *Log) Infof(fmtString string, args ...interface{})

func (*Log) NeedRedact

func (l *Log) NeedRedact(originalString string, regexP *regexp.Regexp) bool

func (*Log) Redact

func (l *Log) Redact(fmtedString string) string

func (*Log) Warn

func (l *Log) Warn(fmtString string)

func (*Log) Warnf

func (l *Log) Warnf(fmtString string, args ...interface{})

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL