Skip to content

Commit

Permalink
rename proto to protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
kesuskim authored and vishr committed Jul 11, 2018
1 parent 2a54603 commit 09dcba1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions middleware/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type (
// - host
// - method
// - path
// - proto
// - protocol
// - referer
// - user_agent
// - status
Expand Down Expand Up @@ -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())
Expand Down
2 changes: 1 addition & 1 deletion middleware/logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}))
Expand Down

0 comments on commit 09dcba1

Please sign in to comment.