diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2019-12-23 12:45:35 -0700 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2019-12-23 12:45:35 -0700 |
commit | 95ed603de79c66ff76bfe7e42986a2fc8c7a1fa4 (patch) | |
tree | 1a788b8eba98f0c2e69e5816bac9c7cc09aca96f /modules/logging | |
parent | cbb405f6aaee046c9de9ffb4f07ca824d9eedeb1 (diff) |
Improve godocs all around
These will be used in the new automated documentation system
Diffstat (limited to 'modules/logging')
-rw-r--r-- | modules/logging/encoders.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/logging/encoders.go b/modules/logging/encoders.go index 28cda55..49ad11a 100644 --- a/modules/logging/encoders.go +++ b/modules/logging/encoders.go @@ -36,7 +36,7 @@ func init() { // ConsoleEncoder encodes log entries that are mostly human-readable. type ConsoleEncoder struct { - zapcore.Encoder + zapcore.Encoder `json:"-"` LogEncoderConfig } @@ -56,8 +56,8 @@ func (ce *ConsoleEncoder) Provision(_ caddy.Context) error { // JSONEncoder encodes entries as JSON. type JSONEncoder struct { - zapcore.Encoder - *LogEncoderConfig + zapcore.Encoder `json:"-"` + LogEncoderConfig } // CaddyModule returns the Caddy module information. @@ -77,7 +77,7 @@ func (je *JSONEncoder) Provision(_ caddy.Context) error { // LogfmtEncoder encodes log entries as logfmt: // https://www.brandur.org/logfmt type LogfmtEncoder struct { - zapcore.Encoder + zapcore.Encoder `json:"-"` LogEncoderConfig } @@ -100,9 +100,9 @@ func (lfe *LogfmtEncoder) Provision(_ caddy.Context) error { // for custom, self-encoded log entries that consist of a // single field in the structured log entry. type StringEncoder struct { - zapcore.Encoder - FieldName string `json:"field,omitempty"` - FallbackRaw json.RawMessage `json:"fallback,omitempty" caddy:"namespace=caddy.logging.encoders inline_key=format"` + zapcore.Encoder `json:"-"` + FieldName string `json:"field,omitempty"` + FallbackRaw json.RawMessage `json:"fallback,omitempty" caddy:"namespace=caddy.logging.encoders inline_key=format"` } // CaddyModule returns the Caddy module information. |