Documentation
¶
Overview ¶
Package rotate 提供一个可以按文件大小进行分割的 io.Writer 实例
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrIndexNotExists = errors.New("必须存在 %i")
ErrIndexNotExists 格式化字符串 %i 不存在
Functions ¶
This section is empty.
Types ¶
type Rotate ¶
type Rotate struct {
// contains filtered or unexported fields
}
Rotate 可按大小进行分割的文件
import "log" // 每个文件以 100M 大小进行分割,以日期名作为文件名保存在 /var/log 下。 f,_ := NewRotate("debug-200601%i", "/var/log", 100*1024*1024) l := log.New(f, "DEBUG", log.LstdFlags)
Click to show internal directories.
Click to hide internal directories.