Documentation
¶
Overview ¶
Package log is meant to provide a global logger for the application and provide logging functionality interface.
Index ¶
- func Debug(format string, v ...any)
- func Err(format string, v ...any)
- func Fatal(format string, v ...any)
- func Info(format string, v ...any)
- func Panic(format string, v ...any)
- func SetGlobalLogger(newL Logger)
- func SetLevel(lvl Level)
- func Warn(format string, v ...any)
- type Config
- type Level
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetGlobalLogger ¶
func SetGlobalLogger(newL Logger)
SetGlobalLogger sets a package default global logger.
Types ¶
type Logger ¶
type Logger interface {
Debug(format string, v ...any)
Info(format string, v ...any)
Warn(format string, v ...any)
Err(format string, v ...any)
Panic(format string, v ...any)
Fatal(format string, v ...any)
SetLevel(Level)
}
Logger interface defines leveled logging functionality
func NewNoopLogger ¶
func NewNoopLogger() Logger
NewNoopLogger creates a new logger that doesn't do anything.
Click to show internal directories.
Click to hide internal directories.