mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-20 22:52:58 -05:00
Renamed {time} placeholder to {when}
This commit is contained in:
parent
24fc2ae59e
commit
822c231f1c
2 changed files with 2 additions and 2 deletions
|
@ -61,7 +61,7 @@ func RequestLog(p parser) Middleware {
|
||||||
|
|
||||||
const (
|
const (
|
||||||
defaultLogFilename = "access.log"
|
defaultLogFilename = "access.log"
|
||||||
commonLogFormat = `{remote} ` + emptyStringReplacer + ` [{time}] "{method} {uri} {proto}" {status} {size}`
|
commonLogFormat = `{remote} ` + emptyStringReplacer + ` [{when}] "{method} {uri} {proto}" {status} {size}`
|
||||||
combinedLogFormat = commonLogFormat + ` "{>Referer}" "{>User-Agent}"`
|
combinedLogFormat = commonLogFormat + ` "{>Referer}" "{>User-Agent}"`
|
||||||
defaultReqLogFormat = commonLogFormat
|
defaultReqLogFormat = commonLogFormat
|
||||||
)
|
)
|
||||||
|
|
|
@ -45,7 +45,7 @@ func newReplacer(r *http.Request, rw *responseRecorder) replacer {
|
||||||
return ""
|
return ""
|
||||||
}(),
|
}(),
|
||||||
"{uri}": r.RequestURI,
|
"{uri}": r.RequestURI,
|
||||||
"{time}": func() string {
|
"{when}": func() string {
|
||||||
return time.Now().Format(timeFormat)
|
return time.Now().Format(timeFormat)
|
||||||
}(),
|
}(),
|
||||||
"{status}": strconv.Itoa(rw.status),
|
"{status}": strconv.Itoa(rw.status),
|
||||||
|
|
Loading…
Add table
Reference in a new issue