Documentation ¶
Overview ¶
Package log 提供基本的日志,分级,输出,轮转等功能 - 考虑使用公司的Log
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRotateFileHook ¶
func NewRotateFileHook(config RotateFileConfig) (logrus.Hook, error)
Types ¶
type Logger ¶
func (*Logger) SetFileOutPut ¶
SetFileOutPut 根据指定的存储路径设置日志文件的存储路径,同时使用 lumberjack 实现日志文件的循环记录 如果循环记录的hook失败,直接panic退出
type RotateFileConfig ¶
type RotateFileHook ¶
type RotateFileHook struct { Config RotateFileConfig // contains filtered or unexported fields }
func (*RotateFileHook) Levels ¶
func (hook *RotateFileHook) Levels() []logrus.Level
Click to show internal directories.
Click to hide internal directories.