Documentation
¶
Index ¶
- func Debugf(msg string, args ...any)
- func Errorf(msg string, args ...any)
- func Fatalf(msg string, args ...any)
- func Infof(msg string, args ...any)
- func Init(name, env string)
- func InitCliLogger(name, env string)
- func InitZapLogger(name, env string)
- func SetGlobal(logger Logger)
- func Warnf(msg string, args ...any)
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init(name, env string)
Initialize logger for the given service name This is the contract for initializing logger. The actual implementation of the logger may vary based on runtime environment
func InitCliLogger ¶
func InitCliLogger(name, env string)
InitCliLogger initializes a zap based logger for CLI apps and sets it as the default logger using SetGlobal. It is different from ZapLogger as it requires loggerKeyCliStdout to be explicitly set true to show logs in stdout
func InitZapLogger ¶
func InitZapLogger(name, env string)
InitZapLogger initializes a zap based logger and sets it as the default logger using SetGlobal
Types ¶
Click to show internal directories.
Click to hide internal directories.