Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Logger ¶
func Logger(config ...*LoggerConfig) nexora.Handler
Logger creates a configurable logger middleware
Types ¶
type LoggerConfig ¶
type LoggerConfig struct {
SkipFunc func(c *nexora.Context) bool // Skip logging for certain requests
LogLatency bool // Include latency
LogIP bool // Include client IP
LogUserAgent bool // Include user agent
MessageFormat string // Custom message format
}
LoggerConfig defines options for the logger middleware
func DefaultLoggerConfig ¶
func DefaultLoggerConfig() *LoggerConfig
DefaultLoggerConfig returns sensible defaults
Click to show internal directories.
Click to hide internal directories.