Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClearOpt ¶
type ClearOpt struct {
Type []string // 要删除的日志类型,为空则删除全部类型
Before int // 保留多少天之前的日志会被删除(天数),为空或<=0 则默认90
}
ClearOpt 表示清理日志的参数。
type Logger ¶
type Logger struct {
Path string // 存放日志的目录,默认为 ./logs
Name string // 日志名称,默认为 log
// contains filtered or unexported fields
}
Logger 是简单日志器的实例。它负责根据名称、类型和日期将日志写入文件。
Click to show internal directories.
Click to hide internal directories.