UnmarshalCaddyfile sets up the module from Caddyfile tokens. Syntax: console { <common encoder config subdirectives...> } See the godoc on the LogEncoderConfig type for the syntax of subdirectives that are common to most/all encoders.
(d *caddyfile.Dispenser)
| 65 | // See the godoc on the LogEncoderConfig type for the syntax of |
| 66 | // subdirectives that are common to most/all encoders. |
| 67 | func (ce *ConsoleEncoder) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { |
| 68 | d.Next() // consume encoder name |
| 69 | if d.NextArg() { |
| 70 | return d.ArgErr() |
| 71 | } |
| 72 | err := ce.LogEncoderConfig.UnmarshalCaddyfile(d) |
| 73 | if err != nil { |
| 74 | return err |
| 75 | } |
| 76 | return nil |
| 77 | } |
| 78 | |
| 79 | // JSONEncoder encodes entries as JSON. |
| 80 | type JSONEncoder struct { |
nothing calls this directly
no test coverage detected