log

package
v0.0.0-...-34ab1a3 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnexpectedLevel  = errors.New("unexpected level")
	ErrUnexpectedFormat = errors.New("unexpected format")
)
View Source
var Logger *zerolog.Logger

Functions

func For

func For(source string) *zerolog.Logger

func SetGlobalFormat

func SetGlobalFormat(format Format)

func SetGlobalLevel

func SetGlobalLevel(level Level)

Types

type Format

type Format = string
const (
	FormatJSON    Format = "json"
	FormatConsole Format = "console"

	FormatDefault = FormatConsole
)

func ParseFormat

func ParseFormat(formatStr string) (Format, error)

type Level

type Level = zerolog.Level
const (
	LevelTrace Level = iota - 1
	LevelDebug
	LevelInfo
	LevelWarn
	LevelError
	LevelFatal
	LevelPanic
	LevelNoLevel
	LevelDisabled

	LevelDefault = LevelDebug
)

func ParseLevel

func ParseLevel(levelStr string) (Level, error)

Jump to

Keyboard shortcuts

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