Customization | Echo

Echo#Logger - the default format for logging is JSON, which writes to os.Stdout by default.

Logging is implemented using slog.Logger interface which allows you to register a custom logger using Echo#Logger.

e.Logger = slog.New(slog.NewJSONHandler(os.Stdout, nil))

Echo#Validator can be used to register a validator for performing data validation on request payload.

Echo#JSONSerializer can be used to register a custom JSON serializer.

Echo#Renderer can be used to register a renderer for template rendering.

Echo#HTTPErrorHandler can be used to register a custom http error handler.

Echo#OnAddRoute can be used to register a callback function that is invoked when a new route is added to the router.

Echo#IPExtractor is used to retrieve IP address reliably/securely, you must let your application be aware of the entire architecture of your infrastructure. In Echo, this can be done by configuring Echo#IPExtractor appropriately.