Echo's Logger interface

Echo provides us with a Logger interface, which facilitates logging both within Echo itself and within this mechanism, which will allow you to access this logger from within your middleware and application handlers. The echo.Logger interface is extremely flexible. The default logger that Echo uses is the labstack/gommon/log logger defined within the https://github.com/labstack/gommon/ repository, but, if you so choose, you can insert your own custom logging by merely implementing the Logger interface. The following is a full listing of the capabilities of the Logger interface, which, when implemented, will give the following capabilities:

type Logger interface {
    Output() io.Writer
    SetOutput(w io.Writer)
    Prefix() 

Get Echo Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.