logger

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultLogouts = &logrus.Logger{}
)

Functions

func NewLog

func NewLog(parameter Parameter) *logrus.Logger

* 返回 logrus 实例

Types

type LogoutsFormatter

type LogoutsFormatter struct {
}

* 默认格式化输出 todo 2021年2月6日22:42:06

func (*LogoutsFormatter) Format

func (receiver *LogoutsFormatter) Format(entry *logrus.Entry) ([]byte, error)

type Parameter

type Parameter struct {
	Level               logrus.Level  // 级别
	ReportCaller        bool          // 如果您希望将调用方法添加为字段
	Fields              logrus.Fields // 自定义字段map
	Hook                logrus.Hook   // 您可以添加用于日志记录级别的挂钩。例如,将错误发送到上的异常跟踪服务Error,Fatal并将Panic信息发送到StatsD或同时记录到多个位置,例如syslog。
	IO                  io.Writer     // io
	RegisterExitHandler func()        // 程序异常后即将退出事件
	DeferExitHandler    func()        //
}

* 参数

Jump to

Keyboard shortcuts

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