log

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close() (err error)

func Debugf

func Debugf(format string, args ...any)

func Errorf

func Errorf(format string, args ...any)

func FUnlock

func FUnlock(file *os.File) error

FUnlock removes the advisory lock set by Flock.

func Flock

func Flock(file *os.File) error

Flock sets an advisory lock for writing on the provided file.

func Infof

func Infof(format string, args ...any)

func SetContext

func SetContext(key string, value string)

func SetLevel

func SetLevel(l Level)

func SetOutput

func SetOutput(f *os.File)

func Tracef

func Tracef(format string, args ...any)

func Warnf

func Warnf(format string, args ...any)

Types

type Level

type Level int
const (
	LevelNone  Level = iota // No logging at all
	LevelError              // Log only ERROR messages
	LevelWarn               // Log ERROR and WARN messages
	LevelInfo               // Log ERROR, WARN, and INFO messages
	LevelDebug              // Log ERROR, WARN, INFO, and DEBUG messages
	LevelTrace              // Log ERROR, WARN, INFO, DEBUG, and TRACE messages
)

func LevelNamed

func LevelNamed(name string) (Level, bool)

func (Level) String

func (l Level) String() string

Jump to

Keyboard shortcuts

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