Closed waterloopwm closed 6 months ago
var logErr = logger.GetLogger() var logContent = logger.GetLogger()
func init() { logErr.SetConsole(false) logErr.SetLevel(logger.INFO) logErr.SetRollingDaily("./log", "err.log")
logContent.SetConsole(false) logContent.SetLevel(logger.INFO) logContent.SetRollingDaily("./log", "content.log")
}
go func() { for { logErr.Info("this is a error") time.Sleep(time.Second * 3) } }() go func() { for { logContent.Info("this is a content") time.Sleep(time.Second * 3) } }()
请作者自己验证,跨天的时候有重大问题,日志备份不能追加,跨天超过两天,只能备份前天的,唉,请问作者自己真的测试了?
谢谢!我测下
@waterloopwm 修复了 https://github.com/donnie4w/go-logger/commit/4740c51383f4d64c33fe424f90ad1f00ca22928a
好的,我再试试,还有源文件里面很多注释的代码可以去掉呀
var logErr = logger.GetLogger() var logContent = logger.GetLogger()
func init() { logErr.SetConsole(false) logErr.SetLevel(logger.INFO) logErr.SetRollingDaily("./log", "err.log")
}
请作者自己验证,跨天的时候有重大问题,日志备份不能追加,跨天超过两天,只能备份前天的,唉,请问作者自己真的测试了?