slogging

package
v0.0.0-...-4d10510 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelInfo int = iota
	LevelDebug
	LevelWarn
	LevelError
)

Variables

This section is empty.

Functions

func Opts

func Opts() *slog.HandlerOptions

Types

type Slogger

type Slogger struct {
	*slog.Logger
}

func Init

func Init(jsonHandler bool) *Slogger

func Logger

func Logger() *Slogger

func SetLevel

func SetLevel(level int) *Slogger

SetLevel allows setting log level and returns the pointer to the re-created logger.

func (*Slogger) Debugf

func (l *Slogger) Debugf(msg string, args ...any)

func (*Slogger) Errorf

func (l *Slogger) Errorf(msg string, args ...any)

func (*Slogger) Infof

func (l *Slogger) Infof(msg string, args ...any)

func (*Slogger) Warnf

func (l *Slogger) Warnf(msg string, args ...any)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL