log

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: UPL-1.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	FieldResourceNamespace = "resource_namespace"
	FieldResourceName      = "resource_name"
	FieldController        = "controller"
	FieldWebhook           = "webhook"
	FieldAgent             = "agent"
)

Variables

This section is empty.

Functions

func BuildZapInfoLogger added in v1.5.0

func BuildZapInfoLogger(callerSkip int) (*zap.SugaredLogger, error)

BuildZapInfoLogger initializes a zap logger at info level

func BuildZapLoggerWithLevel added in v1.5.0

func BuildZapLoggerWithLevel(callerSkip int, level zapcore.Level) (*zap.SugaredLogger, error)

BuildZapLoggerWithLevel initializes a zap logger for a given log level

func ConflictWithLog added in v1.2.0

func ConflictWithLog(message string, err error, log *zap.SugaredLogger) error

ConflictWithLog returns a conflict error and logs a message Returned is an error

func GetDebugEnabledLogger added in v1.5.0

func GetDebugEnabledLogger() *zap.SugaredLogger

GetDebugEnabledLogger Mostly useful for getting a debug enabled logger for unit tests

func IgnoreConflictWithLog added in v1.2.0

func IgnoreConflictWithLog(message string, err error, log *zap.SugaredLogger) (reconcile.Result, error)

IgnoreConflictWithLog ignores conflict error and logs a message Returned is a result and an error

func InitLogs

func InitLogs(opts kzap.Options)

InitLogs initializes logs with Time and Global Level of Logs set at Info

func ResultErrorsWithLog added in v1.2.0

func ResultErrorsWithLog(message string, errors []error, log *zap.SugaredLogger)

ResultErrorsWithLog logs an error message for any error that is not a conflict error. Conflict errors are logged with debug level messages.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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