github.com/gogf/gf@v1.16.9/.example/os/glog/glog_SetConfigWithMap.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 err := g.Log().SetConfigWithMap(g.Map{ 10 "prefix": "[TEST]", 11 }) 12 if err != nil { 13 panic(err) 14 } 15 glog.Info(1) 16 }