aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-02-25 15:14:55 +0100
committerSimon Ser <contact@emersion.fr>2020-02-25 15:14:55 +0100
commit3cfd0b942bda7392fd9f26a64251b4b08a9d2a86 (patch)
tree209687c1c8f631ba226c4f71b7d68a4ec06e4e33 /cmd
parent02faf6174b3d94efd1ee3cc842b55001639a8983 (diff)
downloadalps-3cfd0b942bda7392fd9f26a64251b4b08a9d2a86.tar.gz
alps-3cfd0b942bda7392fd9f26a64251b4b08a9d2a86.zip
cmd: print HTTP requests when -debug is enabled
Diffstat (limited to 'cmd')
-rw-r--r--cmd/koushin/main.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/koushin/main.go b/cmd/koushin/main.go
index d260d99..d9edfc9 100644
--- a/cmd/koushin/main.go
+++ b/cmd/koushin/main.go
@@ -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)