hooks

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLineHook

func NewLineHook(field string, levels ...logrus.Level) logrus.Hook

Use to create an hooks Please provide the field name of the line, and optional log level

Types

type LineHook

type LineHook struct {
	Field string
	Skip  int
	// contains filtered or unexported fields
}

lineHook for logging the caller

func (LineHook) Fire

func (hook LineHook) Fire(entry *logrus.Entry) error

Fire implement fire

func (LineHook) Levels

func (hook LineHook) Levels() []logrus.Level

Levels implement levels

Jump to

Keyboard shortcuts

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