logger

package
v0.0.0-...-e46cadb Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity = logrus.Logger

Entity ....

func NewJSONLogger

func NewJSONLogger(logPath, filename, lv string) (*Entity, error)

NewJSONLogger init logger to set filepath and format

func NewTextLogger

func NewTextLogger(logPath, filename, lv string) (*Entity, error)

NewTextLogger ...

type Hook

type Hook struct {
	Field string
	Skip  int

	Formatter func(file, function string, line int) string
	// contains filtered or unexported fields
}

Hook ... define logrus hook type

func NewHook

func NewHook(levels ...logrus.Level) *Hook

NewHook ...

func (*Hook) Fire

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

Fire ...

func (*Hook) Levels

func (hook *Hook) Levels() []logrus.Level

Levels ...

Jump to

Keyboard shortcuts

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