mirror of
https://github.com/labstack/echo.git
synced 2025-07-03 00:56:59 +02:00
rename proto to protocol
This commit is contained in:
@ -33,7 +33,7 @@ type (
|
|||||||
// - host
|
// - host
|
||||||
// - method
|
// - method
|
||||||
// - path
|
// - path
|
||||||
// - proto
|
// - protocol
|
||||||
// - referer
|
// - referer
|
||||||
// - user_agent
|
// - user_agent
|
||||||
// - status
|
// - status
|
||||||
@ -155,7 +155,7 @@ func LoggerWithConfig(config LoggerConfig) echo.MiddlewareFunc {
|
|||||||
p = "/"
|
p = "/"
|
||||||
}
|
}
|
||||||
return buf.WriteString(p)
|
return buf.WriteString(p)
|
||||||
case "proto":
|
case "protocol":
|
||||||
return buf.WriteString(req.Proto)
|
return buf.WriteString(req.Proto)
|
||||||
case "referer":
|
case "referer":
|
||||||
return buf.WriteString(req.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}",` +
|
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},` +
|
`"method":"${method}","uri":"${uri}","status":${status}, "latency":${latency},` +
|
||||||
`"latency_human":"${latency_human}","bytes_in":${bytes_in}, "path":"${path}", "referer":"${referer}",` +
|
`"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",
|
`"us":"${query:username}", "cf":"${form:username}", "session":"${cookie:session}"}` + "\n",
|
||||||
Output: buf,
|
Output: buf,
|
||||||
}))
|
}))
|
||||||
|
Reference in New Issue
Block a user