Browse Source
logging: Warn for deprecated single_field encoder
master
Matthew Holt
3 years ago
No known key found for this signature in database
GPG Key ID: 2A349DD577D586A5
3 changed files with
5 additions and
4 deletions
-
caddytest/integration/reverseproxy_test.go
-
modules/caddyhttp/reverseproxy/caddyfile.go
-
modules/logging/encoders.go
|
|
@ -371,7 +371,7 @@ func TestReverseProxyHealthCheck(t *testing.T) { |
|
|
|
reverse_proxy { |
|
|
|
to localhost:2020 |
|
|
|
|
|
|
|
health_path /health |
|
|
|
health_uri /health |
|
|
|
health_port 2021 |
|
|
|
health_interval 2s |
|
|
|
health_timeout 5s |
|
|
@ -426,7 +426,7 @@ func TestReverseProxyHealthCheckUnixSocket(t *testing.T) { |
|
|
|
reverse_proxy { |
|
|
|
to unix/%s |
|
|
|
|
|
|
|
health_path /health |
|
|
|
health_uri /health |
|
|
|
health_port 2021 |
|
|
|
health_interval 2s |
|
|
|
health_timeout 5s |
|
|
@ -481,7 +481,7 @@ func TestReverseProxyHealthCheckUnixSocketWithoutPort(t *testing.T) { |
|
|
|
reverse_proxy { |
|
|
|
to unix/%s |
|
|
|
|
|
|
|
health_path /health |
|
|
|
health_uri /health |
|
|
|
health_interval 2s |
|
|
|
health_timeout 5s |
|
|
|
} |
|
|
|
|
|
@ -61,7 +61,7 @@ func parseCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error) |
|
|
|
// lb_try_interval <interval>
|
|
|
|
//
|
|
|
|
// # active health checking
|
|
|
|
// health_path <path>
|
|
|
|
// health_uri <uri>
|
|
|
|
// health_port <port>
|
|
|
|
// health_interval <interval>
|
|
|
|
// health_timeout <duration>
|
|
|
|
|
|
@ -135,6 +135,7 @@ func (SingleFieldEncoder) CaddyModule() caddy.ModuleInfo { |
|
|
|
|
|
|
|
// Provision sets up the encoder.
|
|
|
|
func (se *SingleFieldEncoder) Provision(ctx caddy.Context) error { |
|
|
|
caddy.Log().Named("caddy.logging.encoders.single_field").Warn("the 'single_field' encoder is deprecated and will be removed soon!") |
|
|
|
if se.FallbackRaw != nil { |
|
|
|
val, err := ctx.LoadModule(se, "FallbackRaw") |
|
|
|
if err != nil { |
|
|
|