Documentation ¶
Index ¶
- Constants
- func BuildZapInfoLogger(callerSkip int) (*zap.SugaredLogger, error)
- func BuildZapLoggerWithLevel(callerSkip int, level zapcore.Level) (*zap.SugaredLogger, error)
- func ConflictWithLog(message string, err error, log *zap.SugaredLogger) error
- func GetDebugEnabledLogger() *zap.SugaredLogger
- func IgnoreConflictWithLog(message string, err error, log *zap.SugaredLogger) (reconcile.Result, error)
- func InitLogs(opts kzap.Options)
- func ResultErrorsWithLog(message string, errors []error, log *zap.SugaredLogger)
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
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 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.
Click to show internal directories.
Click to hide internal directories.