log

package
v0.0.0-...-5d7a24c Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(v ...any)

func Debugf

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

func Error

func Error(v ...any)

func Errorf

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

func Fatal

func Fatal(v ...any)

func Fatalf

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

func Info

func Info(v ...any)

func Infof

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

func RegisterLogger

func RegisterLogger(l Logger)

func SetLogLevel

func SetLogLevel(level LogLevel)

func SetOutput

func SetOutput(w io.Writer)

func Trace

func Trace(v ...any)

func Tracef

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

func Warn

func Warn(v ...any)

func Warnf

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

Types

type EmptyLogger

type EmptyLogger struct{}

func (*EmptyLogger) Debug

func (l *EmptyLogger) Debug(v ...any)

func (*EmptyLogger) Debugf

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

func (*EmptyLogger) Error

func (l *EmptyLogger) Error(v ...any)

func (*EmptyLogger) Errorf

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

func (*EmptyLogger) Fatal

func (l *EmptyLogger) Fatal(v ...any)

func (*EmptyLogger) Fatalf

func (l *EmptyLogger) Fatalf(format string, v ...any)

func (*EmptyLogger) Info

func (l *EmptyLogger) Info(v ...any)

func (*EmptyLogger) Infof

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

func (*EmptyLogger) SetLogLevel

func (l *EmptyLogger) SetLogLevel(LogLevel)

func (*EmptyLogger) SetOutput

func (l *EmptyLogger) SetOutput(w io.Writer)

func (*EmptyLogger) Trace

func (l *EmptyLogger) Trace(v ...any)

func (*EmptyLogger) Tracef

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

func (*EmptyLogger) Warn

func (l *EmptyLogger) Warn(v ...any)

func (*EmptyLogger) Warnf

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

type LogLevel

type LogLevel int

LogLevel how much log to dump 0: ALL; 1: INFO; 2: WARN; 3: ERROR; 4: FATAL; 5: OFF

const (
	AllLevel   LogLevel = 0
	InfoLevel  LogLevel = 1
	WarnLevel  LogLevel = 2
	ErrorLevel LogLevel = 3
	FatalLevel LogLevel = 4
	OffLevel   LogLevel = 5
)

type Logger

type Logger interface {
	Fatal(v ...any)
	Fatalf(format string, v ...any)
	Error(v ...any)
	Errorf(format string, v ...any)
	Warn(v ...any)
	Warnf(format string, v ...any)
	Info(v ...any)
	Infof(format string, v ...any)
	Debug(v ...any)
	Debugf(format string, v ...any)
	Trace(v ...any)
	Tracef(format string, v ...any)
	SetLogLevel(level LogLevel)
	SetOutput(io.Writer)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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