logger

package
v0.0.0-...-24c4e56 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, args ...any)

func Error

func Error(msg string, args ...any)

func Info

func Info(msg string, args ...any)

func Init

func Init(cfgOpt *ConfigOpt)

func Warn

func Warn(msg string, args ...any)

Types

type ConfigOpt

type ConfigOpt struct {
	Level Level
}

func NewConfigOpt

func NewConfigOpt() *ConfigOpt

func (*ConfigOpt) WithLevel

func (opt *ConfigOpt) WithLevel(level Level) *ConfigOpt

type Level

type Level int
const (
	DEBUG Level = iota
	INFO
	WARN
	ERROR
)

func NewLogLevel

func NewLogLevel(level string) Level

type Logger

type Logger struct {
	*slog.Logger
}

Jump to

Keyboard shortcuts

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