Documentation
¶
Overview ¶
Package logger Logger implementation based on slog
Index ¶
- func Debug(format string, params ...any)
- func EnableCaller(value bool)
- func EnableJsonFormat(value bool)
- func EnableStacktrace(value bool)
- func Error(format string, params ...any)
- func Fatal(format string, params ...any)
- func Info(format string, params ...any)
- func Init()
- func SetLevel(level string)
- func SetTimeLayout(layout string)
- func Warn(format string, params ...any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnableCaller ¶ added in v1.2.179
func EnableCaller(value bool)
EnableCaller enables/disables logging the caller source file and line number.
func EnableJsonFormat ¶ added in v1.1.2
func EnableJsonFormat(value bool)
EnableJsonFormat configure log output as json (true) or text line (false)
func EnableStacktrace ¶ added in v1.1.2
func EnableStacktrace(value bool)
EnableStacktrace is not supported by slog and is a no-op.
func SetLevel ¶ added in v1.1.2
func SetLevel(level string)
SetLevel log level DEBUG | INFO | WARN | ERROR
func SetTimeLayout ¶ added in v1.1.2
func SetTimeLayout(layout string)
SetTimeLayout define the log entry time layout.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.