Documentation ΒΆ
Index ΒΆ
- func GetRequestID(c *fiber.Ctx) string
- func New(logger *slog.Logger) fiber.Handler
- func NewWithConfig(logger *slog.Logger, config Config) fiber.Handler
- type Config
- type Filter
- func Accept(filter Filter) Filter
- func AcceptHost(hosts ...string) Filter
- func AcceptHostContains(parts ...string) Filter
- func AcceptHostMatch(regs ...regexp.Regexp) Filter
- func AcceptHostPrefix(prefixs ...string) Filter
- func AcceptHostSuffix(prefixs ...string) Filter
- func AcceptMethod(methods ...string) Filter
- func AcceptPath(urls ...string) Filter
- func AcceptPathContains(parts ...string) Filter
- func AcceptPathMatch(regs ...regexp.Regexp) Filter
- func AcceptPathPrefix(prefixs ...string) Filter
- func AcceptPathSuffix(prefixs ...string) Filter
- func AcceptStatus(statuses ...int) Filter
- func AcceptStatusGreaterThan(status int) Filter
- func AcceptStatusGreaterThanOrEqual(status int) Filter
- func Ignore(filter Filter) Filter
- func IgnoreHost(hosts ...string) Filter
- func IgnoreHostContains(parts ...string) Filter
- func IgnoreHostMatch(regs ...regexp.Regexp) Filter
- func IgnoreHostPrefix(prefixs ...string) Filter
- func IgnoreHostSuffix(suffixs ...string) Filter
- func IgnoreMethod(methods ...string) Filter
- func IgnorePath(urls ...string) Filter
- func IgnorePathContains(parts ...string) Filter
- func IgnorePathMatch(regs ...regexp.Regexp) Filter
- func IgnorePathPrefix(prefixs ...string) Filter
- func IgnorePathSuffix(suffixs ...string) Filter
- func IgnoreStatus(statuses ...int) Filter
- func IgnoreStatusLessThan(status int) Filter
- func IgnoreStatusLessThanOrEqual(status int) Filter
Constants ΒΆ
This section is empty.
Variables ΒΆ
This section is empty.
Functions ΒΆ
func GetRequestID ΒΆ
func GetRequestID(c *fiber.Ctx) string
GetRequestID returns the request identifier
func New ΒΆ
New returns a fiber.Handler (middleware) that logs requests using slog.
Requests with errors are logged using slog.Error(). Requests without errors are logged using slog.Info().
func NewWithConfig ΒΆ
NewWithConfig returns a fiber.Handler (middleware) that logs requests using slog.
Types ΒΆ
type Filter ΒΆ added in v1.2.0
type Filter func(ctx *fiber.Ctx) bool
func AcceptHostContains ΒΆ added in v1.2.0
func AcceptHostMatch ΒΆ added in v1.2.0
func AcceptHostPrefix ΒΆ added in v1.2.0
func AcceptHostSuffix ΒΆ added in v1.2.0
func AcceptPathContains ΒΆ added in v1.2.0
func AcceptPathMatch ΒΆ added in v1.2.0
func AcceptPathPrefix ΒΆ added in v1.2.0
func AcceptPathSuffix ΒΆ added in v1.2.0
func AcceptStatusGreaterThan ΒΆ added in v1.2.0
func AcceptStatusGreaterThanOrEqual ΒΆ added in v1.2.0
func IgnoreHost ΒΆ added in v1.2.0
func IgnoreHostContains ΒΆ added in v1.2.0
func IgnoreHostMatch ΒΆ added in v1.2.0
func IgnoreHostPrefix ΒΆ added in v1.2.0
func IgnoreHostSuffix ΒΆ added in v1.2.0
func IgnoreMethod ΒΆ added in v1.2.0
func IgnorePath ΒΆ added in v1.2.0
func IgnorePathContains ΒΆ added in v1.2.0
func IgnorePathMatch ΒΆ added in v1.2.0
func IgnorePathPrefix ΒΆ added in v1.2.0
func IgnorePathSuffix ΒΆ added in v1.2.0
func IgnoreStatus ΒΆ added in v1.2.0
func IgnoreStatusLessThan ΒΆ added in v1.2.0
func IgnoreStatusLessThanOrEqual ΒΆ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.