mirror of
https://github.com/labstack/echo.git
synced 2024-11-24 08:22:21 +02:00
rename proto to protocol
This commit is contained in:
parent
2a5460328f
commit
09dcba1d39
@ -33,7 +33,7 @@ type (
|
||||
// - host
|
||||
// - method
|
||||
// - path
|
||||
// - proto
|
||||
// - protocol
|
||||
// - referer
|
||||
// - user_agent
|
||||
// - status
|
||||
@ -155,7 +155,7 @@ func LoggerWithConfig(config LoggerConfig) echo.MiddlewareFunc {
|
||||
p = "/"
|
||||
}
|
||||
return buf.WriteString(p)
|
||||
case "proto":
|
||||
case "protocol":
|
||||
return buf.WriteString(req.Proto)
|
||||
case "referer":
|
||||
return buf.WriteString(req.Referer())
|
||||
|
@ -92,7 +92,7 @@ func TestLoggerTemplate(t *testing.T) {
|
||||
Format: `{"time":"${time_rfc3339_nano}","id":"${id}","remote_ip":"${remote_ip}","host":"${host}","user_agent":"${user_agent}",` +
|
||||
`"method":"${method}","uri":"${uri}","status":${status}, "latency":${latency},` +
|
||||
`"latency_human":"${latency_human}","bytes_in":${bytes_in}, "path":"${path}", "referer":"${referer}",` +
|
||||
`"bytes_out":${bytes_out},"ch":"${header:X-Custom-Header}", "proto":"${proto}"` +
|
||||
`"bytes_out":${bytes_out},"ch":"${header:X-Custom-Header}", "protocol":"${protocol}"` +
|
||||
`"us":"${query:username}", "cf":"${form:username}", "session":"${cookie:session}"}` + "\n",
|
||||
Output: buf,
|
||||
}))
|
||||
|
Loading…
Reference in New Issue
Block a user