github labstack/echo v4.14.0

3 hours ago

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

Don't miss a new echo release

NewReleases is sending notifications on new releases.