代码拉取完成,页面将自动刷新
package glog
// Format 日志输出格式
type Format int
const (
TextFormat Format = iota // 文本格式
JsonFormat // JSON格式
)
func (f Format) String() string {
switch f {
case TextFormat:
return "text"
case JsonFormat:
return "json"
}
return "none"
}
// CutRule 日志切割规则
type CutRule int
const (
CutByYear CutRule = iota + 1 // 按照年切割
CutByMonth // 按照月切割
CutByDay // 按照日切割
CutByHour // 按照时切割
CutByMinute // 按照分切割
CutBySecond // 按照秒切割
)
func (c CutRule) String() string {
switch c {
case CutByYear:
return "year"
case CutByMonth:
return "month"
case CutByDay:
return "day"
case CutByHour:
return "hour"
case CutByMinute:
return "minute"
case CutBySecond:
return "second"
}
return "none"
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。