Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultZapLoggerConfig is the default ZapLogger middleware config. DefaultZapLoggerConfig = ZapLoggerConfig{ Skipper: DefaultSkipper, IncludeRequestLogMessage: false, } )
Functions ¶
func DefaultSkipper ¶
func DefaultSkipper(echo.Context) bool
DefaultSkipper returns false which processes the middleware
func ZapLogger ¶
ZapLogger is a middleware and zap to provide an "access log" like logging for each request.
func ZapLoggerWithConfig ¶
func ZapLoggerWithConfig(log *zap.Logger, config ZapLoggerConfig) echo.MiddlewareFunc
ZapLoggerWithConfig is a middleware (with configuration) and zap to provide an "access log" like logging for each request.
Types ¶
type ZapLoggerConfig ¶
type ZapLoggerConfig struct { // Skipper defines a function to skip middleware Skipper Skipper // Whether to include the request method and URI in the log message field // Makes it easier to visualize the logs in systems that expand only the log message by default(e.g. Stackdriver) IncludeRequestLogMessage bool }
ZapLoggerConfig defines the config for ZapLogger middleware
Click to show internal directories.
Click to hide internal directories.