middleware

package
v0.0.0-...-36ab9e0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessLogger

func AccessLogger(config *AccessLoggerConfig) fiber.Handler

Types

type AccessLoggerConfig

type AccessLoggerConfig struct {
	Logger *zap.Logger
	// Type determines whether zap will be initialized as a file logger or,
	// by default, as a console logger.
	Type string

	// Environment determines whether zap will be initialized using a production
	// or a development logger.
	Environment string

	// Filename is the file to write logs to.  Backup log files will be retained
	// in the same directory.
	Filename string

	// MaxSize is the maximum size in megabytes of the log file before it gets
	// rotated.
	MaxSize int

	// MaxAge is the maximum number of days to retain old log files based on the
	// timestamp encoded in their filename.  Note that a day is defined as 24
	// hours and may not exactly correspond to calendar days due to daylight
	// savings, leap seconds, etc. The default is not to remove old log files
	// based on age.
	MaxAge int

	// MaxBackups is the maximum number of old log files to retain.
	MaxBackups int

	// LocalTime determines if the time used for formatting the timestamps in
	// backup files is the computer's local time.
	LocalTime bool

	// Compress determines if the rotated log files should be compressed
	// using gzip.
	Compress bool
	//LogLevel defines log level
	Level zapcore.Level
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL