log

package
v0.0.0-...-8aa6e6d Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Disable

func Disable()

Sets global logging output to `io.Discard`, meaning no log messages will be produced.

func Enable

func Enable()

Sets global logging output to `os.Stderr`.

Types

type ContextualField

type ContextualField struct {
	Name  string
	Value string
}

type Logger

type Logger = zerolog.Logger

func EnrichLogger

func EnrichLogger(log Logger, debug bool, fields ...ContextualField) Logger

Returns a copy of provided `log` with additional contextual fields. If `debug` is true, a returning logger will be configured to `zerolog.DebugLevel` level.

func Setup

func Setup(debug bool, fields ...ContextualField) Logger

Returns a copy of default `zerolog.Logger` with specified contextual fields. If `debug` is true, a returning logger will be configured to `zerolog.DebugLevel` level.

Jump to

Keyboard shortcuts

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