log

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Level

type Level int8
const (
	LevelSilent Level = iota
	LevelError
	LevelInfo
	LevelVerbose
)

func (Level) MarshalText

func (l Level) MarshalText() ([]byte, error)

func (Level) String

func (l Level) String() string

func (*Level) UnmarshalText

func (l *Level) UnmarshalText(text []byte) error

type Logger

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

func New

func New(ops ...Option) *Logger

func (*Logger) Error

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

func (*Logger) Info

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

type Option

type Option func(*Logger)

func WithLevel

func WithLevel(level Level) Option

func WithWriter

func WithWriter(w io.Writer) Option

Jump to

Keyboard shortcuts

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