mirror of
https://github.com/caddyserver/caddy.git
synced 2026-08-27 04:07:28 +00:00
logging: Prep for common_log removal (#4149)
See https://github.com/caddyserver/caddy/issues/4148#issuecomment-833207811
This commit is contained in:
parent
1c6c7714a3
commit
124ba1ba71
2 changed files with 5 additions and 0 deletions
|
|
@ -307,6 +307,8 @@ func (lec *LogEncoderConfig) ZapcoreEncoderConfig() zapcore.EncoderConfig {
|
|||
timeFormat = "2006/01/02 15:04:05.000"
|
||||
case "wall_nano":
|
||||
timeFormat = "2006/01/02 15:04:05.000000000"
|
||||
case "common_log":
|
||||
timeFormat = "02/Jan/2006:15:04:05 -0700"
|
||||
}
|
||||
timeFormatter = func(ts time.Time, encoder zapcore.PrimitiveArrayEncoder) {
|
||||
encoder.AppendString(ts.UTC().Format(timeFormat))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue