logger

package
v0.0.0-...-2fc3053 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(args ...any)

func Debugf

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

func Error

func Error(args ...any)

func Errorf

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

func Fatal

func Fatal(args ...any)

func Fatalf

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

func Info

func Info(args ...any)

func Infof

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

func LogLevel

func LogLevel(level Level)

func SetLogger

func SetLogger(l Logger)

func Warn

func Warn(args ...any)

func Warnf

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

Types

type Default

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

func (*Default) Debug

func (d *Default) Debug(args ...any)

func (*Default) Debugf

func (d *Default) Debugf(format string, args ...any)

func (*Default) Error

func (d *Default) Error(args ...any)

func (*Default) Errorf

func (d *Default) Errorf(format string, args ...any)

func (*Default) Fatal

func (d *Default) Fatal(args ...any)

func (*Default) Fatalf

func (d *Default) Fatalf(format string, args ...any)

func (*Default) Info

func (d *Default) Info(args ...any)

func (*Default) Infof

func (d *Default) Infof(format string, args ...any)

func (*Default) Warn

func (d *Default) Warn(args ...any)

func (*Default) Warnf

func (d *Default) Warnf(format string, args ...any)

type Level

type Level int
const (
	DebugLvl Level = iota
	InfoLvl
	WarnLvl
	ErrorLvl
	FatalLvl
)

type Logger

type Logger interface {
	Debug(args ...any)
	Debugf(format string, args ...any)

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

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

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

	Fatal(args ...any)
	Fatalf(format string, args ...any)
}

type Noop

type Noop struct{}

func (Noop) Debug

func (n Noop) Debug(...any)

func (Noop) Debugf

func (n Noop) Debugf(string, ...any)

func (Noop) Error

func (n Noop) Error(...any)

func (Noop) Errorf

func (n Noop) Errorf(string, ...any)

func (Noop) Fatal

func (n Noop) Fatal(...any)

func (Noop) Fatalf

func (n Noop) Fatalf(string, ...any)

func (Noop) Info

func (n Noop) Info(...any)

func (Noop) Infof

func (n Noop) Infof(string, ...any)

func (Noop) Warn

func (n Noop) Warn(...any)

func (Noop) Warnf

func (n Noop) Warnf(string, ...any)

Jump to

Keyboard shortcuts

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