Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFileWriter ¶
func NewFileWriter(file *FileOption) io.Writer
Types ¶
type FileOption ¶
type FileOption struct { Filename string //指定日志存储位置, 如按日期分割, filename包含%Y-%m-%d.log,/opt/logs/xxx/%Y-%m-%d.log MaxSize int //日志的最大大小(M) MaxAge int //日志文件存储最大天数 }
==================文件存储日志==================
Click to show internal directories.
Click to hide internal directories.