logger

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2022 License: Unlicense Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {

	// Service - the logger has this field add as "service"
	ServiceName string

	// Level specifies the logging level. "DEBUG" is debugging, anything else is INFO
	Level string

	// Console
	//
	// If true then console style output is used - usually for client-side applications.
	// If false log output contains timestamp and a sampling interface.
	Console bool

	// Sampling - when console is false then log output is sampled to mitigate sudden
	// bursts of output typically when an error of some kind occurs.
	Sampling uint32

	zerolog.Logger
}

Logger represents an interface to a typical logger including logging levels, format control and others to be elucidated in future commits.

func (*Logger) Close

func (l *Logger) Close()

Close should be deferred when a Logger is opened.

func (*Logger) Open

func (l *Logger) Open() error

Open creates logger as to the desired loglevel.

Jump to

Keyboard shortcuts

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