Documentation ¶ Index ¶ func CallerPretty(caller *runtime.Frame) (function string, file string) type Hook func (h *Hook) Fire(entry *logrus.Entry) error func (h *Hook) Levels() []logrus.Level func (h *Hook) SetFields(kv logrus.Fields) type Logger func Ins(id ...string) *Logger func (l *Logger) Category(c string) *logrus.Entry func (l *Logger) SetHookFields(kv logrus.Fields) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func CallerPretty ¶ func CallerPretty(caller *runtime.Frame) (function string, file string) 将日志中记录的文件名 file 和方法名 func 转成短名字 Types ¶ type Hook ¶ type Hook struct { // contains filtered or unexported fields } func (*Hook) Fire ¶ func (h *Hook) Fire(entry *logrus.Entry) error func (*Hook) Levels ¶ func (h *Hook) Levels() []logrus.Level func (*Hook) SetFields ¶ func (h *Hook) SetFields(kv logrus.Fields) type Logger ¶ type Logger struct { *logrus.Logger } func Ins ¶ func Ins(id ...string) *Logger func (*Logger) Category ¶ func (l *Logger) Category(c string) *logrus.Entry func (*Logger) SetHookFields ¶ func (l *Logger) SetHookFields(kv logrus.Fields) Source Files ¶ View all Source files hook.go logger.go Click to show internal directories. Click to hide internal directories.