logging

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateLogger

func CreateLogger(name string) *logrus.Logger

CreateLogger creates a new logger with a name prefix

func SetLevel

func SetLevel(newLevel logrus.Level)

SetLevel sets the log level to the given level

Types

type LogNameHook

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

LogNameHook is a logrus hook to a

func NewNameHook

func NewNameHook(name string) *LogNameHook

NewNameHook creates a new hook to add name to entry fields

func (*LogNameHook) Fire

func (h *LogNameHook) Fire(entry *logrus.Entry) error

Fire is triggered on log entry

func (*LogNameHook) Levels

func (h *LogNameHook) Levels() []logrus.Level

Levels specifies the levels of the hook

Jump to

Keyboard shortcuts

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