Documentation
¶
Index ¶
- func NewLogger(outlets *Outlets) *slog.Logger
- func NewNullLogger() *slog.Logger
- func NewTestLogger(t *testing.T) *slog.Logger
- func WithError(l *slog.Logger, err error, msg string) *slog.Logger
- type Outlets
- func (self *Outlets) Add(outlet slog.Handler) *Outlets
- func (self *Outlets) Enabled(ctx context.Context, level slog.Level) bool
- func (self *Outlets) GetLoggerErrorOutlet() slog.Handler
- func (self *Outlets) Handle(ctx context.Context, r slog.Record) error
- func (self *Outlets) WithAttrs(attrs []slog.Attr) slog.Handler
- func (self *Outlets) WithGroup(name string) slog.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNullLogger ¶
Types ¶
type Outlets ¶
type Outlets struct {
// contains filtered or unexported fields
}
func NewOutlets ¶
func NewOutlets() *Outlets
func (*Outlets) GetLoggerErrorOutlet ¶
Return the first outlet added to this Outlets list using Add() with minLevel <= Error. If no such outlet is in this Outlets list, a discarding outlet is returned.
Click to show internal directories.
Click to hide internal directories.