Skip to content

v4.14.0

Latest

Choose a tag to compare

@aldas aldas released this 11 Dec 21:00
· 12 commits to master since this release

middleware.Logger() has been deprecated. For request logging, use middleware.RequestLogger() or
middleware.RequestLoggerWithConfig().

middleware.RequestLogger() replaces middleware.Logger(), offering comparable configuration while relying on the
Go standard library’s new slog logger.

The previous default output format was JSON. The new default follows the standard slog logger settings.
To continue emitting request logs in JSON, configure slog accordingly:

slog.SetDefault(slog.New(slog.NewJSONHandler(os.Stdout, nil)))
e.Use(middleware.RequestLogger())

If you are developing anything more substantial than a demo, use middleware.RequestLoggerWithConfig()

Security

  • Logger middleware json string escaping and deprecation by @aldas in #2849

What's Changed

New Contributors

Full Changelog: v4.13.4...v4.14.0