logrus

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddScopeHook

func AddScopeHook(logger *log.Logger)

Adds an scope hook in the logger if is not already added.

Types

type ScopeHook

type ScopeHook struct {
	LogLevels []log.Level
}

func (*ScopeHook) Fire

func (hook *ScopeHook) Fire(entry *log.Entry) error

Fire will be called when some logging function is called with current hook It will format log entry to string and write it to appropriate writer

func (*ScopeHook) Levels

func (hook *ScopeHook) Levels() []log.Level

Levels define on which log levels this hook would trigger

Jump to

Keyboard shortcuts

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