log

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: Apache-2.0 Imports: 14 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TraceLevel = zerolog.TraceLevel
	DebugLevel = zerolog.DebugLevel
	InfoLevel  = zerolog.InfoLevel
	WarnLevel  = zerolog.WarnLevel
	ErrorLevel = zerolog.ErrorLevel
	FatalLevel = zerolog.FatalLevel
	PanicLevel = zerolog.PanicLevel
	NoLevel    = zerolog.NoLevel
	Disabled   = zerolog.Disabled
)

Functions

func Attach

func Attach(kvs ...string)

func Ctx

func Ctx(ctx context.Context) *zerolog.Logger

func Debug

func Debug() *zerolog.Event

func DebugEnable added in v1.9.0

func DebugEnable() bool

func Error

func Error() *zerolog.Event

func Fatal

func Fatal() *zerolog.Event

func Info

func Info() *zerolog.Event

func Log

func Log() *zerolog.Event

func Logger

func Logger() zerolog.Logger

func NewConsoleWriter

func NewConsoleWriter() io.Writer

func NewFileWriter

func NewFileWriter(c FileWriterConfig) io.Writer

func Panic

func Panic() *zerolog.Event

func SetLogger

func SetLogger(l zerolog.Logger)

func Trace

func Trace() *zerolog.Event

func Warn

func Warn() *zerolog.Event

func With

func With() zerolog.Context

func WithLevel

func WithLevel(level zerolog.Level) *zerolog.Event

Types

type FileWriterConfig

type FileWriterConfig struct {
	Filename   string
	MaxSize    int
	MaxAge     int
	MaxBackups int
}

type L added in v1.4.1

type L = zerolog.Logger

type Level added in v1.9.0

type Level = zerolog.Level

Jump to

Keyboard shortcuts

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