middleware package - github.com/Abhishek2010dev/nexora/middleware - Go Packages

middleware

package
v0.0.0-...-23cb5e7 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2025 License: MIT Imports: 3 Imported by: 0

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

Jump to

Keyboard shortcuts

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