Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultMaxBytes 将单个日志控制在 10 MiB,兼顾日常排障和轮转频率。 DefaultMaxBytes int64 = 10 << 20 // DefaultMaxFiles 包含当前日志和编号备份,总占用约不超过 50 MiB。 DefaultMaxFiles = 5 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer 按文件大小轮转日志;当前文件使用原路径,历史文件依次为 .1 到 .(maxFiles-1)。
func OpenDefault ¶
Click to show internal directories.
Click to hide internal directories.