github.com/gogf/gf@v1.16.9/.example/os/glog/glog_flags.go (about) 1 package main 2 3 import ( 4 "github.com/gogf/gf/frame/g" 5 "github.com/gogf/gf/os/glog" 6 ) 7 8 func main() { 9 g.Log().SetFlags(glog.F_TIME_TIME | glog.F_FILE_SHORT) 10 g.Log().Println("time and short line number") 11 g.Log().SetFlags(glog.F_TIME_MILLI | glog.F_FILE_LONG) 12 g.Log().Println("time with millisecond and long line number") 13 g.Log().SetFlags(glog.F_TIME_STD | glog.F_FILE_LONG) 14 g.Log().Println("standard time format and long line number") 15 }