logger

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFieldKeys added in v0.0.4

func AddFieldKeys(keys ...string)

func InitFileLog

func InitFileLog(filename string)

InitFileLog 初始化本地文件日志

func InitGrayLog

func InitGrayLog(addr, module string)

InitGrayLog 初始化Graylog

func InitLog

func InitLog(addr, module string, console bool)

InitLog 初始化本地及服务端日志

func InitLogWithField

func InitLogWithField(grayArr string, fields map[string]interface{}, console bool)

func InitLogWithFieldCustomHook added in v0.0.3

func InitLogWithFieldCustomHook(grayArr string, fields map[string]interface{}, console bool, customHook logrus.Hook)

Types

type LogrusFieldsHook added in v0.0.4

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

func (*LogrusFieldsHook) Fire added in v0.0.4

func (hook *LogrusFieldsHook) Fire(e *logrus.Entry) error

func (*LogrusFieldsHook) Levels added in v0.0.4

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

Jump to

Keyboard shortcuts

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