mxlogger

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOGGER_MAX_SIZE         = 20         //每个日志文件保存的最大尺寸 单位:M
	LOGGER_MAX_BACKUPS      = 30         //日志文件最多保存多少个备份
	LOGGER_MAX_AGE          = 30         //文件最多保存多少天
	LOGGER_COMPRESS         = true       //是否压缩
	DEFAULT_LOGGER_FILEPATH = "/var/log" //默认文件存储路径
)

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(日志目录 string, 日志文件名 string, 日志级别 string, 日志最大文件大小 int, 日志最大文件数 int,
	日志文件最大保存天天数 int, 日志文件是否压缩 bool, 服务名 string) *zap.Logger

创建日志对象

func NewLoggerDefault

func NewLoggerDefault(日志目录 string, 日志文件名 string, 日志级别 string, 服务名 string) *zap.Logger

创建日志对象

Types

This section is empty.

Jump to

Keyboard shortcuts

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