Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultEchoLoggerConfig = EchoLoggerConfig{ Skipper: middleware.DefaultSkipper, Logger: lxLog.GetLogger(), LoggerOutFormat: lxLog.GetOutFormat(), } )
DefaultEchoLoggerConfig
Functions ¶
func EchoLogger ¶ added in v1.2.9
func EchoLogger() echo.MiddlewareFunc
EchoLogger returns an EchoLogger middleware with default config. Default config based on logger init Usage: e.Use(lxLogMiddleware.EchoLogger())
func EchoLoggerWithConfig ¶ added in v1.2.9
func EchoLoggerWithConfig(config EchoLoggerConfig) echo.MiddlewareFunc
EchoLoggerWithConfig returns an EchoLogger middleware with custom config. Usage:
e.Use(lxLogMiddleware.EchoLoggerWithConfig(lxLogMiddleware.EchoLoggerConfig { Logger: log, OutFormat: lxLog.FormatText, }))
Types ¶
type EchoLoggerConfig ¶ added in v1.2.9
type EchoLoggerConfig struct { // Skipper defines a function to skip middleware. middleware.Skipper // Logger instance Logger *logrus.Logger // LoggerOutFormat format for output. LoggerOutFormat lxLog.OutFormat }
EchoLoggerConfig defines the config for EchoLoggerConfig middleware.
Click to show internal directories.
Click to hide internal directories.