1 Star 0 Fork 0

SuperManager/leaf3389

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
plugins.go 1.17 KB
一键复制 编辑 原始数据 按行查看 历史
黄柠檬 提交于 2024-08-07 15:36 . init
package log
import "time"
type ZapCnfKey struct {
}
type ZapCnf struct {
Debug bool //调试模式 本地打印
Level string
Net string
Addr string
Tag string
//log rotate配置,如下
// filename is the file to write logs to. Backup log files will be retained
// in the same directory. It uses <processname>-lumberjack.log in
// os.TempDir() if empty.
Filename string
// maxSize is the maximum size in bytes of the log file before it gets
// rotated.
MaxSize int64
// maxAge is the maximum time to retain old log files based on the timestamp
// encoded in their filename. The default is not to remove old log files
// based on age.
MaxAge time.Duration
// maxBackups is the maximum number of old log files to retain. The default
// is to retain all old log files (though MaxAge may still cause them to get
// deleted.)
MaxBackups int
// localTime determines if the time used for formatting the timestamps in
// backup files is the computer's local time. The default is to use UTC
// time.
LocalTime bool
// compress determines if the rotated log files should be compressed
// using gzip. The default is not to perform compression.
Compress bool
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kongkekongke/leaf3389.git
git@gitee.com:kongkekongke/leaf3389.git
kongkekongke
leaf3389
leaf3389
v1.0.0

搜索帮助