|
1 | 1 | # Changelog |
2 | 2 |
|
3 | | -## v4.14.0 - 2025-12-xx |
| 3 | +## v4.14.0 - 2025-12-11 |
| 4 | + |
| 5 | +`middleware.Logger` has been deprecated. For request logging, use `middleware.RequestLogger` or |
| 6 | +`middleware.RequestLoggerWithConfig`. |
| 7 | + |
| 8 | +`middleware.RequestLogger` replaces `middleware.Logger`, offering comparable configuration while relying on the |
| 9 | +Go standard library’s new `slog` logger. |
| 10 | + |
| 11 | +The previous default output format was JSON. The new default follows the standard `slog` logger settings. |
| 12 | +To continue emitting request logs in JSON, configure `slog` accordingly: |
| 13 | +```go |
| 14 | +slog.SetDefault(slog.New(slog.NewJSONHandler(os.Stdout, nil))) |
| 15 | +e.Use(middleware.RequestLogger()) |
| 16 | +``` |
| 17 | + |
4 | 18 |
|
5 | 19 | **Security** |
6 | 20 |
|
7 | | -* Logger middleware: escape string values when logger format looks like JSON |
| 21 | +* Logger middleware json string escaping and deprecation by @aldas in https://github.com/labstack/echo/pull/2849 |
| 22 | + |
8 | 23 |
|
9 | 24 |
|
10 | 25 | **Enhancements** |
11 | 26 |
|
12 | | -* Add `middleware.RequestLogger` function to replace `middleware.Logger`. `middleware.RequestLogger` uses default slog logger. |
13 | | - Default slog logger output can be configured to JSON format like that: |
14 | | - ```go |
15 | | - slog.SetDefault(slog.New(slog.NewJSONHandler(os.Stdout, nil))) |
16 | | - e.Use(middleware.RequestLogger()) |
17 | | - ``` |
18 | | -* Deprecate `middleware.Logger` function and point users to `middleware.RequestLogger` and `middleware.RequestLoggerWithConfig` |
| 27 | +* Update deps by @aldas in https://github.com/labstack/echo/pull/2807 |
| 28 | +* refactor to use reflect.TypeFor by @cuiweixie in https://github.com/labstack/echo/pull/2812 |
| 29 | +* Use Go 1.25 in CI by @aldas in https://github.com/labstack/echo/pull/2810 |
| 30 | +* Modernize context.go by replacing interface{} with any by @vishr in https://github.com/labstack/echo/pull/2822 |
| 31 | +* Fix typo in SetParamValues comment by @vishr in https://github.com/labstack/echo/pull/2828 |
| 32 | +* Fix typo in ContextTimeout middleware comment by @vishr in https://github.com/labstack/echo/pull/2827 |
| 33 | +* Improve BasicAuth middleware: use strings.Cut and RFC compliance by @vishr in https://github.com/labstack/echo/pull/2825 |
| 34 | +* Fix duplicate plus operator in router backtracking logic by @yuya-morimoto in https://github.com/labstack/echo/pull/2832 |
| 35 | +* Replace custom private IP range check with built-in net.IP.IsPrivate by @kumapower17 in https://github.com/labstack/echo/pull/2835 |
| 36 | +* Ensure proxy connection is closed in proxyRaw function(#2837) by @kumapower17 in https://github.com/labstack/echo/pull/2838 |
| 37 | +* Update deps by @aldas in https://github.com/labstack/echo/pull/2843 |
| 38 | +* Update golang.org/x/* deps by @aldas in https://github.com/labstack/echo/pull/2850 |
| 39 | + |
| 40 | + |
19 | 41 |
|
20 | 42 | ## v4.13.4 - 2025-05-22 |
21 | 43 |
|
|
0 commit comments