Documentation
¶
Overview ¶
This package provides a global logger instance that is used by other packages within go-apiops. The default is to discard any logging. It uses go-logr/logr. The logger instance can be set by calling SetLogger.
General behaviour; * Errors will not be logged, but returned instead. Logging those is up to the caller. * The library does not use verbosity level 0 * level 1 is used for informational messages (when calling `Info`) * level 2 is used for debug messages (when calling `Debug`)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debug ¶
func Debug(msg string, keysAndValues ...interface{})
Debug logs a debug message ("info" at verbosity level 2).
func Error ¶
Error logs an error message. Preferably errors should bubble up to the caller, so only if that is not possible, this method should be used.
func Info ¶
func Info(msg string, keysAndValues ...interface{})
Info logs an informational message ("info" at verbosity level 1).
func Initialize ¶
Initialize creates and sets a logger instance to log to stderr. Any follow up calls to Initialize will ignore the parameters and set the logger to the initially created instance. see https://pkg.go.dev/log#pkg-constants for the flag values
Types ¶
This section is empty.