mirror of
https://github.com/caddyserver/caddy.git
synced 2025-03-21 12:59:26 +01:00
logging: Caddyfile support for duration_format
(#4684)
Somehow, this was missed. Oops!
This commit is contained in:
parent
22d8edb984
commit
7d229665ed
1 changed files with 12 additions and 9 deletions
|
@ -128,15 +128,16 @@ type LogEncoderConfig struct {
|
||||||
// UnmarshalCaddyfile populates the struct from Caddyfile tokens. Syntax:
|
// UnmarshalCaddyfile populates the struct from Caddyfile tokens. Syntax:
|
||||||
//
|
//
|
||||||
// {
|
// {
|
||||||
// message_key <key>
|
// message_key <key>
|
||||||
// level_key <key>
|
// level_key <key>
|
||||||
// time_key <key>
|
// time_key <key>
|
||||||
// name_key <key>
|
// name_key <key>
|
||||||
// caller_key <key>
|
// caller_key <key>
|
||||||
// stacktrace_key <key>
|
// stacktrace_key <key>
|
||||||
// line_ending <char>
|
// line_ending <char>
|
||||||
// time_format <format>
|
// time_format <format>
|
||||||
// level_format <format>
|
// duration_format <format>
|
||||||
|
// level_format <format>
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
func (lec *LogEncoderConfig) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
|
func (lec *LogEncoderConfig) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
|
||||||
|
@ -163,6 +164,8 @@ func (lec *LogEncoderConfig) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
|
||||||
lec.LineEnding = &arg
|
lec.LineEnding = &arg
|
||||||
case "time_format":
|
case "time_format":
|
||||||
lec.TimeFormat = arg
|
lec.TimeFormat = arg
|
||||||
|
case "duration_format":
|
||||||
|
lec.DurationFormat = arg
|
||||||
case "level_format":
|
case "level_format":
|
||||||
lec.LevelFormat = arg
|
lec.LevelFormat = arg
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue