log

package
v0.17.3 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy() zerolog.Logger

func Debug

func Debug() *zerolog.Event

func Disable

func Disable()

func Error

func Error() *zerolog.Event

func Fatal

func Fatal() *zerolog.Event

func Info

func Info() *zerolog.Event

func Middleware

func Middleware() gin.HandlerFunc

Middleware which provides ability to log with gin using the built-in zerolog logger instead of the default one

func Panic

func Panic() *zerolog.Event

func Setup

func Setup(l Level, logToConsole, logToFile bool, fp string)

func Trace

func Trace() *zerolog.Event

func Warn

func Warn() *zerolog.Event

Types

type Level

type Level zerolog.Level

Level wraps zerolog.Level in order to marshal into the config.yml file as a string

const (
	DebugLevel Level = iota
	InfoLevel
	WarnLevel
	ErrorLevel
	FatalLevel
	PanicLevel

	TraceLevel Level = -1
)

func (Level) MarshalYAML

func (l Level) MarshalYAML() (interface{}, error)

func (Level) String

func (l Level) String() string

func (Level) UnmarshalYAML

func (l Level) UnmarshalYAML(unmarshal func(interface{}) error) error

func (Level) Zerolog

func (l Level) Zerolog() zerolog.Level

Jump to

Keyboard shortcuts

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