diff --git a/modules/logging/encoders.go b/modules/logging/encoders.go index bc5fe21..38083db 100644 --- a/modules/logging/encoders.go +++ b/modules/logging/encoders.go @@ -128,15 +128,16 @@ type LogEncoderConfig struct { // UnmarshalCaddyfile populates the struct from Caddyfile tokens. Syntax: // // { -// message_key -// level_key -// time_key -// name_key -// caller_key -// stacktrace_key -// line_ending -// time_format -// level_format +// message_key +// level_key +// time_key +// name_key +// caller_key +// stacktrace_key +// line_ending +// time_format +// duration_format +// level_format // } // func (lec *LogEncoderConfig) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { @@ -163,6 +164,8 @@ func (lec *LogEncoderConfig) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { lec.LineEnding = &arg case "time_format": lec.TimeFormat = arg + case "duration_format": + lec.DurationFormat = arg case "level_format": lec.LevelFormat = arg default: