cmd: print HTTP requests when -debug is enabled
This commit is contained in:
parent
02faf6174b
commit
3cfd0b942b
1 changed files with 5 additions and 0 deletions
|
@ -50,6 +50,11 @@ func main() {
|
|||
e.Logger.Fatal(err)
|
||||
}
|
||||
e.Use(middleware.Recover())
|
||||
if options.Debug {
|
||||
e.Use(middleware.LoggerWithConfig(middleware.LoggerConfig{
|
||||
Format: "${time_rfc3339} method=${method}, uri=${uri}, status=${status}\n",
|
||||
}))
|
||||
}
|
||||
|
||||
if options.Debug {
|
||||
e.Logger.SetLevel(log.DEBUG)
|
||||
|
|
Loading…
Reference in a new issue