zerolog

package
v0.0.0-...-61eb987 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(config *Config) *zerolog.Logger

newLogger creates a new logger writing to out. The logger will emit a timestamp, the caller's filename, and optionally emit the stacktrace for errors that carry a stack trace.

The Debug and Trace level are samples. It allows up to 100 trace logs per minutes. Additional trace logs will be filtered out. Debug logs are sampled. Every 5th log will be filtered out once the limit of 1000 debug logs per minute is reached.

func NewStdLogger

func NewStdLogger(l *zerolog.Logger) loglib.Logger

func SetGlobalLogger

func SetGlobalLogger(logger *zerolog.Logger)

SetGlobalLogger sets the log output in the stdlib log package and the zerolog global loggers.

Types

type Config

type Config struct {
	LogLevel string
}

Jump to

Keyboard shortcuts

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