Documentation ¶
Overview ¶
Package logger 提供日志记录功能 每条日志均会输出 app、module 字段,分别代表应用,模块,默认值为 default,此两个字段会合并为 fluentd 的 tag 设备插件 app 请使用 plugin_{插件名称} 的格式,方便后台查看 debug 模式下会输出 caller、package 字段作为跟踪
Index ¶
- Constants
- func Debug(args ...interface{})
- func Debugf(format string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(format string, args ...interface{})
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func InitLogger(output io.Writer, level logrus.Level, f logrus.Fields, debug bool, ...)
- func New() *logrus.Logger
- func Panic(args ...interface{})
- func Panicf(format string, args ...interface{})
- func Panicln(args ...interface{})
- func Printf(format string, args ...interface{})
- func Println(args ...interface{})
- func SetDebug(IsDebug bool)
- func Warn(args ...interface{})
- func Warnf(format string, args ...interface{})
- func Warning(args ...interface{})
- func Warningf(format string, args ...interface{})
- type Entry
- func (entry *Entry) Debug(args ...interface{})
- func (entry *Entry) Debugf(format string, args ...interface{})
- func (entry *Entry) Debugln(args ...interface{})
- func (entry *Entry) Error(args ...interface{})
- func (entry *Entry) Errorf(format string, args ...interface{})
- func (entry *Entry) Errorln(args ...interface{})
- func (entry *Entry) Fatal(args ...interface{})
- func (entry *Entry) Fatalf(format string, args ...interface{})
- func (entry *Entry) Fatalln(args ...interface{})
- func (entry *Entry) Info(args ...interface{})
- func (entry *Entry) Infof(format string, args ...interface{})
- func (entry *Entry) Infoln(args ...interface{})
- func (entry *Entry) Log(level logrus.Level, args ...interface{})
- func (entry *Entry) Logf(level logrus.Level, format string, args ...interface{})
- func (entry *Entry) Logln(level logrus.Level, args ...interface{})
- func (entry *Entry) Panic(args ...interface{})
- func (entry *Entry) Panicf(format string, args ...interface{})
- func (entry *Entry) Panicln(args ...interface{})
- func (entry *Entry) Print(args ...interface{})
- func (entry *Entry) Printf(format string, args ...interface{})
- func (entry *Entry) Println(args ...interface{})
- func (entry *Entry) Trace(args ...interface{})
- func (entry *Entry) Tracef(format string, args ...interface{})
- func (entry *Entry) Traceln(args ...interface{})
- func (entry *Entry) Warn(args ...interface{})
- func (entry *Entry) Warnf(format string, args ...interface{})
- func (entry *Entry) Warning(args ...interface{})
- func (entry *Entry) Warningf(format string, args ...interface{})
- func (entry *Entry) Warningln(args ...interface{})
- func (entry *Entry) Warnln(args ...interface{})
- func (entry *Entry) WithField(key string, value interface{}) *Entry
- func (entry *Entry) WithFields(field logrus.Fields) *Entry
- type Option
Constants ¶
View Source
const ( NewEntrySkip = 4 // 外部通过new新的logger,获取的caller层级 DirectEntrySkip = 5 // 直接调用封装的方法,获取的caller层级 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.