logconfig

package module
v0.0.0-...-5180799 Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: MIT Imports: 6 Imported by: 0

README

初始化logrus,给予默认值

默认文件系统,添加本地文件分割的hook

记录文件名和行号

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogConfig

func LogConfig(config Config) error

func LogDefaultConfig

func LogDefaultConfig() error

Types

type Config

type Config struct {
	TimeSuffix   string
	MaxAge       time.Duration
	RotationTime time.Duration
}

Config 参数配置 MaxAge 设置文件清理前的最长保存时间 RotationTime 设置日志分割的时间,隔多久分割一次

Jump to

Keyboard shortcuts

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