mxlogger

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LoggerMaxSize         = 20         //每个日志文件保存的最大尺寸 单位:M
	LoggerMaxBackups      = 30         //日志文件最多保存多少个备份
	LoggerMaxAge          = 30         //文件最多保存多少天
	LoggerCompress        = true       //是否压缩
	DefaultLoggerFilepath = "/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