cmd: print HTTP requests when -debug is enabled
This commit is contained in:
parent
02faf6174b
commit
3cfd0b942b
|
@ -50,6 +50,11 @@ func main() {
|
||||||
e.Logger.Fatal(err)
|
e.Logger.Fatal(err)
|
||||||
}
|
}
|
||||||
e.Use(middleware.Recover())
|
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 {
|
if options.Debug {
|
||||||
e.Logger.SetLevel(log.DEBUG)
|
e.Logger.SetLevel(log.DEBUG)
|
||||||
|
|
Loading…
Reference in a new issue