From 62c3025a7693c5c09edf99ab971e2969d56d3fc1 Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Tue, 17 Mar 2020 12:36:04 +0100 Subject: [PATCH 1/3] Access log field quotes. --- docs/content/observability/access-logs.md | 3 ++- pkg/middlewares/accesslog/logger_formatters.go | 4 ++-- pkg/middlewares/accesslog/logger_formatters_test.go | 2 +- pkg/middlewares/accesslog/logger_test.go | 10 +++++----- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/content/observability/access-logs.md b/docs/content/observability/access-logs.md index 234204ed3..c09a8ebf4 100644 --- a/docs/content/observability/access-logs.md +++ b/docs/content/observability/access-logs.md @@ -35,7 +35,7 @@ If the given format is unsupported, the default (CLF) is used instead. !!! info "Common Log Format" ```html - - [] " " "" "" "" "" ms + - [] " " "" "" "" "" ms ``` ### `bufferingSize` @@ -195,6 +195,7 @@ accessLog: | `RequestMethod` | The HTTP method. | | `RequestPath` | The HTTP request URI, not including the scheme, host or port. | | `RequestProtocol` | The version of HTTP requested. | + | `RequestScheme` | The HTTP scheme requested `http` or `https`. | | `RequestLine` | `RequestMethod` + `RequestPath` + `RequestProtocol` | | `RequestContentSize` | The number of bytes in the request entity (a.k.a. body) sent by the client. | | `OriginDuration` | The time taken by the origin server ('upstream') to return its response. | diff --git a/pkg/middlewares/accesslog/logger_formatters.go b/pkg/middlewares/accesslog/logger_formatters.go index 5abb996d7..4c559a648 100644 --- a/pkg/middlewares/accesslog/logger_formatters.go +++ b/pkg/middlewares/accesslog/logger_formatters.go @@ -45,8 +45,8 @@ func (f *CommonLogFormatter) Format(entry *logrus.Entry) ([]byte, error) { toLog(entry.Data, "request_Referer", `"-"`, true), toLog(entry.Data, "request_User-Agent", `"-"`, true), toLog(entry.Data, RequestCount, defaultValue, true), - toLog(entry.Data, RouterName, defaultValue, true), - toLog(entry.Data, ServiceURL, defaultValue, true), + toLog(entry.Data, RouterName, `"-"`, true), + toLog(entry.Data, ServiceURL, `"-"`, true), elapsedMillis) return b.Bytes(), err diff --git a/pkg/middlewares/accesslog/logger_formatters_test.go b/pkg/middlewares/accesslog/logger_formatters_test.go index ce3c6aec5..79b2273f1 100644 --- a/pkg/middlewares/accesslog/logger_formatters_test.go +++ b/pkg/middlewares/accesslog/logger_formatters_test.go @@ -36,7 +36,7 @@ func TestCommonLogFormatter_Format(t *testing.T) { RouterName: "", ServiceURL: "", }, - expectedLog: `10.0.0.1 - Client [10/Nov/2009:23:00:00 +0000] "GET /foo http" - - "-" "-" 0 - - 123000ms + expectedLog: `10.0.0.1 - Client [10/Nov/2009:23:00:00 +0000] "GET /foo http" - - "-" "-" 0 "-" "-" 123000ms `, }, { diff --git a/pkg/middlewares/accesslog/logger_test.go b/pkg/middlewares/accesslog/logger_test.go index ad81c1c0b..3cf2e61b2 100644 --- a/pkg/middlewares/accesslog/logger_test.go +++ b/pkg/middlewares/accesslog/logger_test.go @@ -449,7 +449,7 @@ func TestNewLogHandlerOutputStdout(t *testing.T) { DefaultMode: "drop", }, }, - expectedLog: `- - - [-] "- - -" - - "testReferer" "testUserAgent" - - - 0ms`, + expectedLog: `- - - [-] "- - -" - - "testReferer" "testUserAgent" - "-" "-" 0ms`, }, { desc: "Default mode drop with override", @@ -464,7 +464,7 @@ func TestNewLogHandlerOutputStdout(t *testing.T) { }, }, }, - expectedLog: `- - TestUser [-] "- - -" - - "testReferer" "testUserAgent" - - - 0ms`, + expectedLog: `- - TestUser [-] "- - -" - - "testReferer" "testUserAgent" - "-" "-" 0ms`, }, { desc: "Default mode drop with header dropped", @@ -482,7 +482,7 @@ func TestNewLogHandlerOutputStdout(t *testing.T) { }, }, }, - expectedLog: `- - TestUser [-] "- - -" - - "-" "-" - - - 0ms`, + expectedLog: `- - TestUser [-] "- - -" - - "-" "-" - "-" "-" 0ms`, }, { desc: "Default mode drop with header redacted", @@ -500,7 +500,7 @@ func TestNewLogHandlerOutputStdout(t *testing.T) { }, }, }, - expectedLog: `- - TestUser [-] "- - -" - - "REDACTED" "REDACTED" - - - 0ms`, + expectedLog: `- - TestUser [-] "- - -" - - "REDACTED" "REDACTED" - "-" "-" 0ms`, }, { desc: "Default mode drop with header redacted", @@ -521,7 +521,7 @@ func TestNewLogHandlerOutputStdout(t *testing.T) { }, }, }, - expectedLog: `- - TestUser [-] "- - -" - - "REDACTED" "testUserAgent" - - - 0ms`, + expectedLog: `- - TestUser [-] "- - -" - - "REDACTED" "testUserAgent" - "-" "-" 0ms`, }, } From 4f92ef5fa9d97fe3c771af1402330d4a6918c999 Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Wed, 18 Mar 2020 15:50:05 +0100 Subject: [PATCH 2/3] Prepare release v2.1.7 --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8db05c361..9d8444d61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +## [v2.1.7](https://github.com/containous/traefik/tree/v2.1.7) (2020-03-18) +[All Commits](https://github.com/containous/traefik/compare/v2.1.6...v2.1.7) + +**Bug fixes:** +- **[logs,middleware]** Access log field quotes. ([#6484](https://github.com/containous/traefik/pull/6484) by [ldez](https://github.com/ldez)) +- **[metrics]** fix statsd scale for duration based metrics ([#6054](https://github.com/containous/traefik/pull/6054) by [ddtmachado](https://github.com/ddtmachado)) +- **[middleware]** Added support for replacement containing escaped characters ([#6413](https://github.com/containous/traefik/pull/6413) by [rtribotte](https://github.com/rtribotte)) + +**Documentation:** +- **[acme,docker]** Add some missing doc. ([#6422](https://github.com/containous/traefik/pull/6422) by [ldez](https://github.com/ldez)) +- **[acme]** Added wildcard ACME example ([#6423](https://github.com/containous/traefik/pull/6423) by [Basster](https://github.com/Basster)) +- **[acme]** fix typo ([#6408](https://github.com/containous/traefik/pull/6408) by [hamiltont](https://github.com/hamiltont)) + ## [v2.1.6](https://github.com/containous/traefik/tree/v2.1.6) (2020-02-28) [All Commits](https://github.com/containous/traefik/compare/v2.1.4...v2.1.6) From 683d5d5a48bad07393fdf577ee26034f3273c81b Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Wed, 18 Mar 2020 17:21:20 +0100 Subject: [PATCH 3/3] chore: skip openbsd/freebsd arm64 --- .goreleaser.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 95086aeb3..a2fbee302 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -34,8 +34,10 @@ builds: goarch: 386 - goos: openbsd goarch: arm + - goos: openbsd + goarch: arm64 - goos: freebsd - goarch: arm + goarch: arm64 changelog: skip: true