log

package
v0.0.0-...-e4f7161 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DebugSink

func DebugSink(reader io.Reader)

func ErrorSink

func ErrorSink(reader io.Reader)

func Init

func Init(conf *Config)

Init should be called when the app starts, from a config object.

func SetLevel

func SetLevel(lv Level)

func WarnSink

func WarnSink(reader io.Reader)

Types

type Config

type Config struct {
	Level Level `json:"level,omitempty"`
}

type Event

type Event = zerolog.Event

func Debug

func Debug() *Event

func Error

func Error() *Event

func Fatal

func Fatal() *Event

func Info

func Info() *Event

func Warn

func Warn() *Event

type Level

type Level = zerolog.Level
const (
	// DebugLevel defines debug log level.
	DebugLevel Level = iota
	// InfoLevel defines info log level.
	InfoLevel
	// WarnLevel defines warn log level.
	WarnLevel
	// ErrorLevel defines error log level.
	ErrorLevel
	// FatalLevel defines fatal log level.
	FatalLevel
	// PanicLevel defines panic log level.
	PanicLevel
	// NoLevel defines an absent log level.
	NoLevel
	// Disabled disables the logger.
	Disabled
)

func GetLevel

func GetLevel() Level

Jump to

Keyboard shortcuts

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