log

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug() *zerolog.Event

Debug starts a new message with debug level.

func Err

func Err(err error) *zerolog.Event

Err starts a new message with error level with err as a field if not nil or with info level if err is nil.

func Error

func Error() *zerolog.Event

Error starts a new message with error level.

func Fatal

func Fatal() *zerolog.Event

Fatal starts a new message with fatal level. The os.Exit(1) function is called by the Msg method, which terminates the program immediately.

func Info

func Info() *zerolog.Event

Info starts a new message with info level.

func Init

func Init(conf Config) error

Init log

func Panic

func Panic() *zerolog.Event

Panic starts a new message with panic level. The panic() function is called by the Msg method, which stops the ordinary flow of a goroutine.

func Trace

func Trace() *zerolog.Event

Trace starts a new message with trace level.

func Warn

func Warn() *zerolog.Event

Warn starts a new message with warn level.

Types

type Config

type Config struct {
	Level   string `mapstructure:"level"`
	Console bool   `mapstructure:"console"`
}

Jump to

Keyboard shortcuts

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