mirror of
https://github.com/usememos/memos.git
synced 2024-12-29 08:33:50 +08:00
chore: add latency in log (#2374)
* Print profile.Data in boot log * Add latency in request log
This commit is contained in:
parent
95bfcb8055
commit
d3e32f0d5a
1 changed files with 1 additions and 1 deletions
|
@ -59,7 +59,7 @@ func NewServer(ctx context.Context, profile *profile.Profile, store *store.Store
|
||||||
}
|
}
|
||||||
|
|
||||||
e.Use(middleware.LoggerWithConfig(middleware.LoggerConfig{
|
e.Use(middleware.LoggerWithConfig(middleware.LoggerConfig{
|
||||||
Format: `{"time":"${time_rfc3339}",` +
|
Format: `{"time":"${time_rfc3339}","latency":"${latency_human}",` +
|
||||||
`"method":"${method}","uri":"${uri}",` +
|
`"method":"${method}","uri":"${uri}",` +
|
||||||
`"status":${status},"error":"${error}"}` + "\n",
|
`"status":${status},"error":"${error}"}` + "\n",
|
||||||
}))
|
}))
|
||||||
|
|
Loading…
Reference in a new issue