Files
gf/.example/os/glog/glog_debug.go

20 lines
281 B
Go
Raw Normal View History

2018-07-22 12:21:56 +08:00
package main
import (
2019-04-03 00:03:46 +08:00
"time"
2019-07-29 21:01:19 +08:00
"github.com/gogf/gf/os/glog"
"github.com/gogf/gf/os/gtime"
"github.com/gogf/gf/os/gtimer"
2018-07-22 12:21:56 +08:00
)
func main() {
2019-06-01 11:01:57 +08:00
gtimer.SetTimeout(3*time.Second, func() {
2019-04-03 00:03:46 +08:00
glog.SetDebug(false)
})
for {
glog.Debug(gtime.Datetime())
time.Sleep(time.Second)
}
2018-07-22 12:21:56 +08:00
}