Documentation ¶
Overview ¶
Package logger is the CNI Logger interface, using zap
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLogLocation ¶ added in v1.7.0
func GetLogLocation() string
GetLogLocation returns the log file path
Types ¶
type Configuration ¶ added in v1.6.1
Configuration stores the config for the logger
func LoadLogConfig ¶ added in v1.6.1
func LoadLogConfig() *Configuration
LoadLogConfig returns the log configuration
type Fields ¶ added in v1.6.1
type Fields map[string]interface{}
Fields Type to pass when we want to call WithFields for structured logging
type Logger ¶ added in v1.6.1
type Logger interface { Debugf(format string, args ...interface{}) Debug(format string) Infof(format string, args ...interface{}) Info(format string) Warnf(format string, args ...interface{}) Warn(format string) Errorf(format string, args ...interface{}) Error(format string) Fatalf(format string, args ...interface{}) Panicf(format string, args ...interface{}) WithFields(keyValues Fields) Logger }
Logger is our contract for the logger
func DefaultLogger ¶ added in v1.6.1
func DefaultLogger() Logger
DefaultLogger creates and returns a new default logger.
func New ¶ added in v1.6.1
func New(inputLogConfig *Configuration) Logger
New logger initializes logger
Click to show internal directories.
Click to hide internal directories.