donnie4w / go-logger

High-performance Go logging library, with concurrency performance 10 times or more faster than the official library. Go高性能日志库,适用于高并发场景,并发性能是官方库10倍或以上
https://tlnet.top/logdoc
BSD 3-Clause "New" or "Revised" License
305 stars 103 forks source link

按天的日志有大问题,作者有仔细测试吗,自己项目有用这个 #15

Closed waterloopwm closed 6 months ago

waterloopwm commented 7 years 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)
    }
}()

请作者自己验证,跨天的时候有重大问题,日志备份不能追加,跨天超过两天,只能备份前天的,唉,请问作者自己真的测试了?

donnie4w commented 7 years ago

谢谢!我测下

donnie4w commented 7 years ago

@waterloopwm 修复了 https://github.com/donnie4w/go-logger/commit/4740c51383f4d64c33fe424f90ad1f00ca22928a

waterloopwm commented 7 years ago

好的,我再试试,还有源文件里面很多注释的代码可以去掉呀