Documentation ¶
Index ¶
- func DefaultLogger() *slog.Logger
- func NewDebugFileLogger(f *os.File) *slog.Logger
- func NewDebugStdOutLogger() *slog.Logger
- func NewJSONLogger(w io.Writer, level slog.Level) *slog.Logger
- func NewTextLogger(w io.Writer, level slog.Level) *slog.Logger
- func NewThrowAwayLogger() *slog.Logger
- func SetDefaultLogger(logger *slog.Logger) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultLogger ¶
DefaultLogger is a logger to which every gobject fallbacks if it's Log is not set by user
func NewDebugFileLogger ¶
NewDebugFileLogger creates new logger which logs text messages into the given file with Debug level while also computing source of each message.
func NewDebugStdOutLogger ¶
NewDebugStdOutLogger creates new logger which logs text messages into the standard output with Debug level while also computing source of each message.
func NewJSONLogger ¶
NewJSONLogger creates a new logger which logs structured messages (JSON) of at least the level severity into the given writer.
func NewTextLogger ¶
NewTextLogger creates a new logger which logs text messages of at least the level severity into the given writer.
func NewThrowAwayLogger ¶
NewThrowAwayLogger creates new logger which throws everything away, i.e. a loggger which does not log anything. This behaviour propagates to any derived loggers.
func SetDefaultLogger ¶
SetDefaultLogger sets the DefaultLogger for every gobject with unset logger. Returns error on nil.
Types ¶
This section is empty.