logger

package
v0.0.35 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup added in v0.0.11

func Setup(config Config)

Setup sets up the application logger globally.

Types

type Config added in v0.0.11

type Config struct {
	// level defines minimum log level that needs to be logged.
	Level string
	// Discard defines if the logs should be discarded or not.
	Discard bool
	// StaticFields defines the list of static random key-value pair that should
	// appear in the logs.
	StaticFields map[string]interface{}
	// CtxFields defines the list of dynamic context key-value pair that should
	// appear in the logs.
	CtxFields map[string]interface{}
}

Config holds configuration parameters.

func (Config) Fire added in v0.0.11

func (c Config) Fire(e *logrus.Entry) error

Fire runs on each logging call in order to add static and dynamic key-value pair to logs.

func (Config) Levels added in v0.0.11

func (c Config) Levels() []logrus.Level

Levels allows all log levels to include all key-value pair.

Jump to

Keyboard shortcuts

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