local_file_hook

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: MIT Imports: 10 Imported by: 0

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) Fire

func (h *LocalFileHook) Fire(entry *logrus.Entry) error

func (*LocalFileHook) Levels

func (h *LocalFileHook) Levels() []logrus.Level

Jump to

Keyboard shortcuts

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