log

package
v3.31.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 1 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultLogger

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

func NewDefaultLogger

func NewDefaultLogger() *DefaultLogger

func (*DefaultLogger) Debug

func (l *DefaultLogger) Debug(msg string, fields Fields)

func (*DefaultLogger) Error

func (l *DefaultLogger) Error(msg string, fields Fields)

func (*DefaultLogger) Fatal

func (l *DefaultLogger) Fatal(msg string, fields Fields)

func (*DefaultLogger) GetLevel

func (l *DefaultLogger) GetLevel() LogLevel

func (*DefaultLogger) Info

func (l *DefaultLogger) Info(msg string, fields Fields)

func (*DefaultLogger) Panic

func (l *DefaultLogger) Panic(msg string, fields Fields)

func (*DefaultLogger) SetLevel

func (l *DefaultLogger) SetLevel(level LogLevel)

func (*DefaultLogger) Warn

func (l *DefaultLogger) Warn(msg string, fields Fields)

type Fields

type Fields map[string]interface{}

type LogLevel

type LogLevel uint32
const (
	PanicLevel LogLevel = iota
	FatalLevel
	ErrorLevel
	WarnLevel
	InfoLevel
	DebugLevel
	TraceLevel
)

type Logger

type Logger interface {
	Panic(msg string, fields Fields)
	Fatal(msg string, fields Fields)
	Error(msg string, fields Fields)
	Warn(msg string, fields Fields)
	Info(msg string, fields Fields)
	Debug(msg string, fields Fields)
	SetLevel(level LogLevel)
	GetLevel() LogLevel
}

Jump to

Keyboard shortcuts

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