Just guessing, but these solutions come to mind. Here's some pseudocode for what I think Tamás was trying to say...
var x sync.Mutex for { sleep(24 hours) x.Lock() write/start a new daily log x.Unlock() } or get a delay by selecting on a channel something like this select { case <-time.After(24 hours): write/start new log } On Wednesday, June 29, 2016 at 7:18:17 AM UTC-4, Wei Feng wrote: > > Can you say it in more detail? > Thinks. > > 在 2016年6月28日星期二 UTC+8下午12:23:28,Tamás Gulácsi写道: >> >> Don't Stat on every log line, but use some other mechanism (mutex, >> channel) to rotate the logs every day. > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.