logging

package
v0.0.0-...-60df22a Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LogLevelDebug is the debug log level
	LogLevelDebug = "debug"
	// LogLevelInfo is the info log level
	LogLevelInfo = "info"
	// LogLevelWarn is the warn log level
	LogLevelWarn = "warn"
	// LogLevelError is the error log level
	LogLevelError = "error"
	// LogLevelFatal is the fatal log level
	LogLevelFatal = "fatal"
)

Variables

View Source
var LogLevel = LogLevelInfo

LogLevel is the current log level

Functions

This section is empty.

Types

type LogStdAdapter

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

func NewLogStdAdapter

func NewLogStdAdapter() *LogStdAdapter

func (*LogStdAdapter) Debug

func (l *LogStdAdapter) Debug(format string, args ...interface{})

func (*LogStdAdapter) Error

func (l *LogStdAdapter) Error(format string, args ...interface{})

func (*LogStdAdapter) Fatal

func (l *LogStdAdapter) Fatal(format string, args ...interface{})

func (*LogStdAdapter) Info

func (l *LogStdAdapter) Info(format string, args ...interface{})

func (*LogStdAdapter) Printf

func (l *LogStdAdapter) Printf(format string, args ...interface{})

func (*LogStdAdapter) Println

func (l *LogStdAdapter) Println(args ...interface{})

func (*LogStdAdapter) SetOutput

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

func (*LogStdAdapter) Warn

func (l *LogStdAdapter) Warn(format string, args ...interface{})

type Logger

type Logger interface {
	Info(format string, args ...interface{})
	Debug(format string, args ...interface{})
	Error(format string, args ...interface{})
	Warn(format string, args ...interface{})
	Fatal(format string, args ...interface{})
	Println(args ...interface{})
	Printf(format string, args ...interface{})
	SetOutput(io.Writer)
}

type Logging

type Logging struct {
	Logger
}

func NewLogStdLogging

func NewLogStdLogging() *Logging

func NewLogrusLogging

func NewLogrusLogging() *Logging

type LogrusAdpter

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

func NewLogrusAdpter

func NewLogrusAdpter(logger *logrus.Logger) *LogrusAdpter

func (*LogrusAdpter) Debug

func (l *LogrusAdpter) Debug(format string, args ...interface{})

func (*LogrusAdpter) Error

func (l *LogrusAdpter) Error(format string, args ...interface{})

func (*LogrusAdpter) Fatal

func (l *LogrusAdpter) Fatal(format string, args ...interface{})

func (*LogrusAdpter) Info

func (l *LogrusAdpter) Info(format string, args ...interface{})

func (*LogrusAdpter) Printf

func (l *LogrusAdpter) Printf(format string, args ...interface{})

func (*LogrusAdpter) Println

func (l *LogrusAdpter) Println(args ...interface{})

func (*LogrusAdpter) SetOutput

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

func (*LogrusAdpter) Warn

func (l *LogrusAdpter) Warn(format string, args ...interface{})

Jump to

Keyboard shortcuts

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