Documentation ¶
Overview ¶
功能: 说明: https://juejin.cn/post/6844903549881909256 logrus默认是没有像logrotate那样的日志切割功能
Index ¶
Constants ¶
View Source
const ( ROTATION_TIME = time.Hour * 24 ROTATION_COUNT = 30 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalFileHook ¶
type LocalFileHook struct {
// contains filtered or unexported fields
}
LocalFileHook ...
func NewLocalFileHook ¶
func NewLocalFileHook(dir, filename string, levels []logrus.Level) *LocalFileHook
本地异步循环日志
func (*LocalFileHook) Close ¶
func (h *LocalFileHook) Close()
func (*LocalFileHook) Levels ¶
func (h *LocalFileHook) Levels() []logrus.Level
Click to show internal directories.
Click to hide internal directories.