logger

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Level

type Level int8
const (
	InfoLevel Level = iota
	WarnLevel
	ErrorLevel
	Disabled

	DebugLevel Level = -1
	TraceLevel Level = -2
)

type LogWriter

type LogWriter interface {
	Printf(format string, v ...any)
	Errorf(format string, v ...any)
	Warnf(format string, v ...any)
	Infof(format string, v ...any)
	Debugf(format string, v ...any)
	Tracef(format string, v ...any)
	Level() Level
	SetLevel(Level)
	ShouldLevel(Level) bool
}

type Logger

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

func New

func New() *Logger

func (*Logger) Debugf

func (l *Logger) Debugf(format string, v ...any)

func (*Logger) Errorf

func (l *Logger) Errorf(format string, v ...any)

func (*Logger) Infof

func (l *Logger) Infof(format string, v ...any)

func (*Logger) Level

func (l *Logger) Level() Level

func (*Logger) Printf

func (l *Logger) Printf(format string, v ...any)

func (*Logger) SetLevel

func (l *Logger) SetLevel(lvl Level)

func (*Logger) ShouldLevel

func (l *Logger) ShouldLevel(lvl Level) bool

func (*Logger) Tracef

func (l *Logger) Tracef(format string, v ...any)

func (*Logger) Warnf

func (l *Logger) Warnf(format string, v ...any)

Jump to

Keyboard shortcuts

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