logs.go (traefik-v2.3.2.src) | : | logs.go (traefik-v2.3.3.src) | ||
---|---|---|---|---|
skipping to change at line 26 | skipping to change at line 26 | |||
CommonFormat string = "common" | CommonFormat string = "common" | |||
// JSONFormat is the JSON logging format. | // JSONFormat is the JSON logging format. | |||
JSONFormat string = "json" | JSONFormat string = "json" | |||
) | ) | |||
// TraefikLog holds the configuration settings for the traefik logger. | // TraefikLog holds the configuration settings for the traefik logger. | |||
type TraefikLog struct { | type TraefikLog struct { | |||
Level string `description:"Log level set to traefik logs." json:"level ,omitempty" toml:"level,omitempty" yaml:"level,omitempty" export:"true"` | Level string `description:"Log level set to traefik logs." json:"level ,omitempty" toml:"level,omitempty" yaml:"level,omitempty" export:"true"` | |||
FilePath string `description:"Traefik log file path. Stdout is used when omitted or empty." json:"filePath,omitempty" toml:"filePath,omitempty" yaml:"fil ePath,omitempty"` | FilePath string `description:"Traefik log file path. Stdout is used when omitted or empty." json:"filePath,omitempty" toml:"filePath,omitempty" yaml:"fil ePath,omitempty"` | |||
Format string `description:"Traefik log format: json | common" json:"fo rmat,omitempty" toml:"format,omitempty" yaml:"format,omitempty"` | Format string `description:"Traefik log format: json | common" json:"fo rmat,omitempty" toml:"format,omitempty" yaml:"format,omitempty" export:"true"` | |||
} | } | |||
// SetDefaults sets the default values. | // SetDefaults sets the default values. | |||
func (l *TraefikLog) SetDefaults() { | func (l *TraefikLog) SetDefaults() { | |||
l.Format = CommonFormat | l.Format = CommonFormat | |||
l.Level = "ERROR" | l.Level = "ERROR" | |||
} | } | |||
// AccessLog holds the configuration settings for the access logger (middlewares /accesslog). | // AccessLog holds the configuration settings for the access logger (middlewares /accesslog). | |||
type AccessLog struct { | type AccessLog struct { | |||
FilePath string `description:"Access log file path. Stdou t is used when omitted or empty." json:"filePath,omitempty" toml:"filePath,omite mpty" yaml:"filePath,omitempty" export:"true"` | FilePath string `description:"Access log file path. Stdou t is used when omitted or empty." json:"filePath,omitempty" toml:"filePath,omite mpty" yaml:"filePath,omitempty"` | |||
Format string `description:"Access log format: json | c ommon" json:"format,omitempty" toml:"format,omitempty" yaml:"format,omitempty" e xport:"true"` | Format string `description:"Access log format: json | c ommon" json:"format,omitempty" toml:"format,omitempty" yaml:"format,omitempty" e xport:"true"` | |||
Filters *AccessLogFilters `description:"Access log filters, used to keep only specific access logs." json:"filters,omitempty" toml:"filters,omitemp ty" yaml:"filters,omitempty" export:"true"` | Filters *AccessLogFilters `description:"Access log filters, used to keep only specific access logs." json:"filters,omitempty" toml:"filters,omitemp ty" yaml:"filters,omitempty" export:"true"` | |||
Fields *AccessLogFields `description:"AccessLogFields." json:"fie lds,omitempty" toml:"fields,omitempty" yaml:"fields,omitempty" export:"true"` | Fields *AccessLogFields `description:"AccessLogFields." json:"fie lds,omitempty" toml:"fields,omitempty" yaml:"fields,omitempty" export:"true"` | |||
BufferingSize int64 `description:"Number of access log lines to process in a buffered way." json:"bufferingSize,omitempty" toml:"bufferingSiz e,omitempty" yaml:"bufferingSize,omitempty" export:"true"` | BufferingSize int64 `description:"Number of access log lines to process in a buffered way." json:"bufferingSize,omitempty" toml:"bufferingSiz e,omitempty" yaml:"bufferingSize,omitempty" export:"true"` | |||
} | } | |||
// SetDefaults sets the default values. | // SetDefaults sets the default values. | |||
func (l *AccessLog) SetDefaults() { | func (l *AccessLog) SetDefaults() { | |||
l.Format = CommonFormat | l.Format = CommonFormat | |||
l.FilePath = "" | l.FilePath = "" | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |