log

package
v0.0.0-...-3078164 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: MIT, Unlicense Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetFile

func SetFile(name string)

SetFile logs to the given file.

Types

type Level

type Level = int
const (
	Debug Level = iota
	Info
	Warn
	Error
)

type LogFunc

type LogFunc func(level Level, format string, values ...any)

type Logger

type Logger struct {
	Func LogFunc
}

func Default

func Default() Logger

func System

func System(name string) Logger

System uses the default logger but specifies a name for the subsystem.

func (Logger) Debugf

func (l Logger) Debugf(format string, values ...any)

func (Logger) Errorf

func (l Logger) Errorf(format string, values ...any)

func (Logger) Infof

func (l Logger) Infof(format string, values ...any)

func (Logger) Warnf

func (l Logger) Warnf(format string, values ...any)

Jump to

Keyboard shortcuts

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