filehook

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileHook

type FileHook struct {
	LogFolderPath string
}

FileHook is a hook for writing log in local file

func NewFileHook

func NewFileHook(logFolderPath string) *FileHook

NewFileHook is an new method for new a file hook

func (*FileHook) Fire

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

Fire is the method must defined in hook

func (*FileHook) GetLogFilePath

func (hook *FileHook) GetLogFilePath(level logrus.Level) string

GetLogFilePath is a func to get log file path

func (*FileHook) Levels

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

Levels is the method must defined in hook

Jump to

Keyboard shortcuts

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