log

package
v0.0.0-...-84ba103 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 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 ...interface{})

func Debugf

func Debugf(format string, v ...interface{})

func Error

func Error(v ...interface{})

func Errorf

func Errorf(format string, v ...interface{})

func Fatal

func Fatal(v ...interface{})

func Fatalf

func Fatalf(format string, v ...interface{})

func Info

func Info(v ...interface{})

func Infof

func Infof(format string, v ...interface{})

func RegisterLogger

func RegisterLogger(l Logger)

func SetLogLevel

func SetLogLevel(level LogLevel)

func SetOutput

func SetOutput(w io.Writer)

func Trace

func Trace(v ...interface{})

func Tracef

func Tracef(format string, v ...interface{})

func Warn

func Warn(v ...interface{})

func Warnf

func Warnf(format string, v ...interface{})

Types

type EmptyLogger

type EmptyLogger struct{}

func (*EmptyLogger) Debug

func (l *EmptyLogger) Debug(v ...interface{})

func (*EmptyLogger) Debugf

func (l *EmptyLogger) Debugf(format string, v ...interface{})

func (*EmptyLogger) Error

func (l *EmptyLogger) Error(v ...interface{})

func (*EmptyLogger) Errorf

func (l *EmptyLogger) Errorf(format string, v ...interface{})

func (*EmptyLogger) Fatal

func (l *EmptyLogger) Fatal(v ...interface{})

func (*EmptyLogger) Fatalf

func (l *EmptyLogger) Fatalf(format string, v ...interface{})

func (*EmptyLogger) Info

func (l *EmptyLogger) Info(v ...interface{})

func (*EmptyLogger) Infof

func (l *EmptyLogger) Infof(format string, v ...interface{})

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 ...interface{})

func (*EmptyLogger) Tracef

func (l *EmptyLogger) Tracef(format string, v ...interface{})

func (*EmptyLogger) Warn

func (l *EmptyLogger) Warn(v ...interface{})

func (*EmptyLogger) Warnf

func (l *EmptyLogger) Warnf(format string, v ...interface{})

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 ...interface{})
	Fatalf(format string, v ...interface{})
	Error(v ...interface{})
	Errorf(format string, v ...interface{})
	Warn(v ...interface{})
	Warnf(format string, v ...interface{})
	Info(v ...interface{})
	Infof(format string, v ...interface{})
	Debug(v ...interface{})
	Debugf(format string, v ...interface{})
	Trace(v ...interface{})
	Tracef(format string, v ...interface{})
	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