gf/.example/os/glog/glog_async2.go

16 lines
194 B
Go

package main
import (
"time"
"github.com/gogf/gf/os/glog"
)
func main() {
glog.SetAsync(true)
for i := 0; i < 10; i++ {
glog.Async().Print("async log", i)
}
time.Sleep(time.Second)
}