genlog

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasLevel

func HasLevel(level Level) bool

func Log

func Log(level Level, pattern string, args ...any)

func Set

func Set(logger Logger)

func SetLevel

func SetLevel(level Level)

Types

type Level

type Level uint8
const (
	LevelWarning Level = iota
	LevelInfo
	LevelTrace
	LevelSilent
)

func (*Level) Set

func (l *Level) Set(value string) error

func (Level) String

func (l Level) String() string

type Logger

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

type Logger struct {Logger describes ability to

func New

func New(output io.Writer, level Level) Logger

func (Logger) HasLevel

func (l Logger) HasLevel(level Level) bool

func (Logger) Log

func (l Logger) Log(level Level, pattern string, args ...any)

Log writes a log record.

Jump to

Keyboard shortcuts

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