logger

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetGlobalLevel added in v0.1.1

func SetGlobalLevel(level zerolog.Level)

SetGlobalLevel set level for all loggers

func SetGlobalLogFile added in v0.1.1

func SetGlobalLogFile(f *os.File)

SetGlobalLogFile set all loggers to log to file

func SetWithCaller added in v0.1.1

func SetWithCaller()

SetWithCaller enables showing caller in log context

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger our internal "singleton" wrapper around zerolog allowing us to set all loggers to log to file or console all at once

func New

func New() Logger

New returns the internal "singleton" logger

func (Logger) Debug

func (l Logger) Debug() *zerolog.Event

Debug wrapper around zerolog Debug

func (Logger) Error

func (l Logger) Error() *zerolog.Event

Error wrapper around zerolog Error

func (Logger) Fatal

func (l Logger) Fatal() *zerolog.Event

Fatal wrapper around zerolog Fatal

func (Logger) Info

func (l Logger) Info() *zerolog.Event

Info wrapper around zerolog Info

func (Logger) Warn

func (l Logger) Warn() *zerolog.Event

Warn wrapper around zerolog Warn

Jump to

Keyboard shortcuts

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