Reputation: 1021
I'm having some trouble to set the right log configuration in Beego for production mod. While developing the log keeps on printing access logs but in production it stop. Even 404 are not printed. I tried to set the log level to Debug and set a new file logger but it still not printing access log.
func main() {
runtime.GOMAXPROCS(8)
beego.SetLevel(beego.LevelDebug)
beego.SetLogger("file", `{"filename":"logs/test.log"}`)
beego.Run()
}
Any help with this?
Upvotes: 2
Views: 2144
Reputation: 147
As for latest Beego, it would look like this.
func main() {
beego.BConfig.Log.AccessLogs = true
beego.Run()
}
Upvotes: 0