Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoggerMiddleware ¶
func LoggerMiddleware(cfg AccessLogger) echo.MiddlewareFunc
LoggerMiddleware is an echo middleware for access logging.
func NewRotateFileHook ¶
func NewRotateFileHook(config RotateFileConfig) logrus.Hook
NewRotateFileHook created a new Logrus file rotation hook.
Types ¶
type AccessLogger ¶
type AccessLogger struct { Enabled bool `mapstructure:"enabled"` Path string `mapstructure:"path"` Format string `mapstructure:"format"` MaxSize int `mapstructure:"max-size"` MaxBackups int `mapstructure:"max-backups"` MaxAge int `mapstructure:"max-age"` }
AccessLogger represents a struct for echo access logger middleware configurations.
type AppLogger ¶
type AppLogger struct { Level string `mapstructure:"level"` Path string `mapstructure:"path"` MaxSize int `mapstructure:"max-size"` MaxBackups int `mapstructure:"max-backups"` MaxAge int `mapstructure:"max-age"` StdOut bool `mapstructure:"stdout"` }
AppLogger represents a struct for application logger configurations.
type RotateFileConfig ¶
type RotateFileConfig struct { Filename string MaxSize int MaxBackups int MaxAge int LocalTime bool Compress bool Level logrus.Level Formatter logrus.Formatter }
RotateFileConfig represents a configuration struct for the Logrus file rotation hook.
type RotateFileHook ¶
type RotateFileHook struct { Config RotateFileConfig // contains filtered or unexported fields }
RotateFileHook represents a struct for the Logrus file rotation hook.
func (*RotateFileHook) Fire ¶
func (hook *RotateFileHook) Fire(entry *logrus.Entry) (err error)
Fire implements the Logrus Hook interface.
func (*RotateFileHook) Levels ¶
func (hook *RotateFileHook) Levels() []logrus.Level
Levels implements the Logrus Hook interface.
Click to show internal directories.
Click to hide internal directories.