diff options
author | Francis Lavoie <[email protected]> | 2021-07-14 13:07:38 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2021-07-14 11:07:38 -0600 |
commit | 124ba1ba714220322c65625012c564f89b75bfc9 (patch) | |
tree | 3ad8d07414fd5b9a7d507d9b0e3a5fb645dbbf0c /modules/logging | |
parent | 1c6c7714a38879f78c486fcb9c7c6e39fc39c6a5 (diff) | |
download | caddy-124ba1ba714220322c65625012c564f89b75bfc9.tar.gz caddy-124ba1ba714220322c65625012c564f89b75bfc9.zip |
logging: Prep for `common_log` removal (#4149)
See https://github.com/caddyserver/caddy/issues/4148#issuecomment-833207811
Diffstat (limited to 'modules/logging')
-rw-r--r-- | modules/logging/encoders.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/logging/encoders.go b/modules/logging/encoders.go index 40e86bdcc..8b2b44c18 100644 --- a/modules/logging/encoders.go +++ b/modules/logging/encoders.go @@ -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)) |