Documentation
¶
Overview ¶
Package logger provides a small structured logger with flag-based level, output, and timezone settings.
Index ¶
- func Error(msg string, kv ...any)
- func ErrorSkipframes(skipframes int, msg string, kv ...any)
- func Fatal(msg string, kv ...any)
- func FatalSkipframes(skipframes int, msg string, kv ...any)
- func Info(msg string, kv ...any)
- func InfoSkipframes(skipframes int, msg string, kv ...any)
- func Init()
- func Panic(msg string, kv ...any)
- func PanicSkipframes(skipframes int, msg string, kv ...any)
- func ResetOutput()
- func SetOutput(w io.Writer)
- func StdErrorLogger() *log.Logger
- func Warn(msg string, kv ...any)
- func WarnSkipframes(skipframes int, msg string, kv ...any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorSkipframes ¶
ErrorSkipframes logs error message and skips the given number of frames for the caller.
func FatalSkipframes ¶
FatalSkipframes logs fatal message and terminates the app.
func InfoSkipframes ¶
InfoSkipframes logs info message and skips the given number of frames for the caller.
func PanicSkipframes ¶
PanicSkipframes logs panic message and panics.
func StdErrorLogger ¶
StdErrorLogger returns a stdlib logger that writes through Error.
func WarnSkipframes ¶
WarnSkipframes logs warn message and skips the given number of frames for the caller.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.