mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-14 14:56:27 +03: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 (
|
||||
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}"`
|
||||
defaultReqLogFormat = commonLogFormat
|
||||
)
|
||||
|
|
|
@ -45,7 +45,7 @@ func newReplacer(r *http.Request, rw *responseRecorder) replacer {
|
|||
return ""
|
||||
}(),
|
||||
"{uri}": r.RequestURI,
|
||||
"{time}": func() string {
|
||||
"{when}": func() string {
|
||||
return time.Now().Format(timeFormat)
|
||||
}(),
|
||||
"{status}": strconv.Itoa(rw.status),
|
||||
|
|
Loading…
Reference in a new issue