Documentation
¶
Overview ¶
Package logfiberv3 is the Fiber v3 adapter for the logcore structured logger. See the sibling logfiber package for Fiber v2.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Middleware ¶
Middleware returns a Fiber v3 handler that emits one structured log per request after the handler chain runs. Trace fields (trace.id, transaction.id) are attached when apmfiberv3.Middleware ran first.
Types ¶
type Config ¶
type Config struct {
// SkipPaths lists request paths that bypass logging entirely.
// Default: ["/live", "/ready", "/health"].
SkipPaths []string
// SkipFunc, when non-nil, is called for every request that was not
// already skipped by SkipPaths. Returning true suppresses the log
// entry. Use this for method-, pattern- or prefix-based skip rules:
//
// cfg.SkipFunc = func(method, path string) bool {
// return method == "OPTIONS" || strings.HasPrefix(path, "/internal/")
// }
SkipFunc func(method, path string) bool
// Logger overrides the global logcore logger. Nil → use the global.
Logger *logcore.Logger
}
Config tunes the middleware. All fields are optional.
Click to show internal directories.
Click to hide internal directories.