log

package
v0.0.2-0...-4ce78c8 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: Apache-2.0, Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddStrippedKeys

func AddStrippedKeys(strippedKeys []string)

AddStrippedKeys allows configuration keys cleaned up

func ChangeLogLevel

func ChangeLogLevel(l seelog.LoggerInterface, level string) error

ChangeLogLevel changes the current log level, valide levels are trace, debug, info, warn, error, critical and off, it requires a new seelog logger because an existing one cannot be updated

func CredentialsCleanerBytes

func CredentialsCleanerBytes(file []byte) ([]byte, error)

CredentialsCleanerBytes scrubs credentials from slice of bytes

func CredentialsCleanerFile

func CredentialsCleanerFile(filePath string) ([]byte, error)

CredentialsCleanerFile scrubs credentials from file in path

func Critical

func Critical(v ...interface{}) error

Critical logs at the critical level and returns an error containing the formated log message

func CriticalStackDepth

func CriticalStackDepth(depth int, v ...interface{}) error

CriticalStackDepth logs at the critical level and the current stack depth plus the additional given one and returns an error containing the formated log message

func Criticalf

func Criticalf(format string, params ...interface{}) error

Criticalf logs with format at the critical level and returns an error containing the formated log message

func Debug

func Debug(v ...interface{})

Debug logs at the debug level

func Debugc

func Debugc(message string, context ...interface{})

Debugc logs at the debug level with context

func Debugf

func Debugf(format string, params ...interface{})

Debugf logs with format at the debug level

func Error

func Error(v ...interface{}) error

Error logs at the error level and returns an error containing the formated log message

func ErrorStackDepth

func ErrorStackDepth(depth int, v ...interface{}) error

ErrorStackDepth logs at the error level and the current stack depth plus the additional given one and returns an error containing the formated log message

func Errorf

func Errorf(format string, params ...interface{}) error

Errorf logs with format at the error level and returns an error containing the formated log message

func Flush

func Flush()

Flush flushes the underlying inner log

func GetLogLevel

func GetLogLevel() (seelog.LogLevel, error)

GetLogLevel returns a seelog native representation of the current log level

func Info

func Info(v ...interface{})

Info logs at the info level

func InfoStackDepth

func InfoStackDepth(depth int, v ...interface{})

InfoStackDepth logs at the info level and the current stack depth plus the additional given one

func Infoc

func Infoc(message string, context ...interface{})

Infoc logs at the info level with context

func Infof

func Infof(format string, params ...interface{})

Infof logs with format at the info level

func JMXError

func JMXError(v ...interface{}) error

JMXError Logs for JMX check

func JMXInfo

func JMXInfo(v ...interface{})

JMXInfo Logs

func RegisterAdditionalLogger

func RegisterAdditionalLogger(n string, l seelog.LoggerInterface) error

RegisterAdditionalLogger registers an additional logger for logging

func ReplaceLogger

ReplaceLogger allows replacing the internal logger, returns old logger

func SanitizeURL

func SanitizeURL(message string) string

SanitizeURL sanitizes credentials from a message containing a URL, and returns a string that can be logged safely.

func SetupJMXLogger

func SetupJMXLogger(i seelog.LoggerInterface, level string)

SetupJMXLogger setup JMXfetch specific logger

func SetupLogger

func SetupLogger(i seelog.LoggerInterface, level string)

SetupLogger setup agent wide logger

func Trace

func Trace(v ...interface{})

Trace logs at the trace level

func Tracec

func Tracec(message string, context ...interface{})

Tracec logs at the trace level with context

func Tracef

func Tracef(format string, params ...interface{})

Tracef logs with format at the trace level

func UnregisterAdditionalLogger

func UnregisterAdditionalLogger(n string) error

UnregisterAdditionalLogger unregisters additional logger with name n

func Warn

func Warn(v ...interface{}) error

Warn logs at the warn level and returns an error containing the formated log message

func WarnStackDepth

func WarnStackDepth(depth int, v ...interface{}) error

WarnStackDepth logs at the warn level and the current stack depth plus the additional given one and returns an error containing the formated log message

func Warnf

func Warnf(format string, params ...interface{}) error

Warnf logs with format at the warn level and returns an error containing the formated log message

Types

type DatadogLogger

type DatadogLogger struct {
	// contains filtered or unexported fields
}

DatadogLogger wrapper structure for seelog

type Replacer

type Replacer struct {
	Regex    *regexp.Regexp
	Hints    []string // If any of these hints do not exist in the line, then we know the regex wont match either
	Repl     []byte
	ReplFunc func(b []byte) []byte
}

Replacer structure to store regex matching and replacement functions

Jump to

Keyboard shortcuts

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