logger

package
v0.0.0-...-805313b Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	SetLogLevel(level slog.Level)
	ParseLogLevel(level string) (slog.Level, error)
	Info(msg string, keysAndValues ...any)
	Error(msg string, keysAndValues ...any)
	Debug(msg string, keysAndValues ...any)
	Warn(msg string, keysAndValues ...any)
}

type SlogWrapper

type SlogWrapper struct {
	// contains filtered or unexported fields
}

func NewSlogWrapper

func NewSlogWrapper(logger *slog.Logger, logLevel *slog.LevelVar) *SlogWrapper

NewSlogWrapper creates a new instance of SlogWrapper with the given slog.Logger.

func (*SlogWrapper) Debug

func (l *SlogWrapper) Debug(msg string, keysAndValues ...interface{})

func (*SlogWrapper) Error

func (l *SlogWrapper) Error(msg string, keysAndValues ...interface{})

func (*SlogWrapper) Info

func (l *SlogWrapper) Info(msg string, keysAndValues ...interface{})

func (*SlogWrapper) ParseLogLevel

func (l *SlogWrapper) ParseLogLevel(level string) (slog.Level, error)

func (*SlogWrapper) SetLogLevel

func (l *SlogWrapper) SetLogLevel(level slog.Level)

func (*SlogWrapper) Warn

func (l *SlogWrapper) Warn(msg string, keysAndValues ...interface{})

Jump to

Keyboard shortcuts

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