log

package
v0.0.0-...-52b5cf2 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelDebug = slog.LevelDebug
	LevelTrace = slog.Level(-2)
	LevelInfo  = slog.LevelInfo
	LevelWarn  = slog.LevelWarn
	LevelError = slog.LevelError
	LevelFatal = slog.Level(10)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Level

type Level = slog.Level

type Logger

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

func New

func New(level slog.Level) *Logger

func (*Logger) Debug

func (l *Logger) Debug(msg string, args ...any)

func (*Logger) Error

func (l *Logger) Error(msg string, args ...any)

func (*Logger) Fatal

func (l *Logger) Fatal(msg string, args ...any)

func (*Logger) Info

func (l *Logger) Info(msg string, args ...any)

func (*Logger) Log

func (l *Logger) Log(ctx context.Context, level slog.Level, msg string, args ...any)

func (*Logger) SetLevel

func (l *Logger) SetLevel(level Level)

func (*Logger) Warn

func (l *Logger) Warn(msg string, args ...any)

Jump to

Keyboard shortcuts

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