config.go — fiber Source File
Architecture documentation for config.go, a go file in the fiber codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR da519fe2_a5aa_4587_9bdb_974d6c113d35["config.go"] 564c090e_fe6d_bb17_d47f_6f89724ae28f["io"] da519fe2_a5aa_4587_9bdb_974d6c113d35 --> 564c090e_fe6d_bb17_d47f_6f89724ae28f style da519fe2_a5aa_4587_9bdb_974d6c113d35 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
package logger
import (
"io"
"os"
"time"
"github.com/gofiber/fiber/v3"
)
// Config defines the config for middleware.
type Config struct {
// Stream is a writer where logs are written
//
// Default: os.Stdout
Stream io.Writer
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c fiber.Ctx) bool
// Skip is a function to determine if logging is skipped or written to Stream.
//
// Optional. Default: nil
Skip func(c fiber.Ctx) bool
// Done is a function that is called after the log string for a request is written to Output,
// and pass the log string as parameter.
//
// Optional. Default: nil
Done func(c fiber.Ctx, logString []byte)
// tagFunctions defines the custom tag action
//
// Optional. Default: map[string]LogFunc
CustomTags map[string]LogFunc
// You can define specific things before returning the handler: colors, template, etc.
//
// Optional. Default: beforeHandlerFunc
BeforeHandlerFunc func(*Config)
// You can use custom loggers with Fiber by using this field.
// This field is really useful if you're using Zerolog, Zap, Logrus, apex/log etc.
// If you don't define anything for this field, it'll use default logger of Fiber.
//
// Optional. Default: defaultLogger
LoggerFunc func(c fiber.Ctx, data *Data, cfg *Config) error
timeZoneLocation *time.Location
// Format defines the logging format for the middleware.
//
// You can customize the log output by defining a format string with placeholders
// such as: ${time}, ${ip}, ${status}, ${method}, ${path}, ${latency}, ${error}, etc.
// The full list of available placeholders can be found in 'tags.go' or at
// 'https://docs.gofiber.io/api/middleware/logger/#constants'.
//
// Fiber provides predefined logging formats that can be used directly:
// ... (130 more lines)
Domain
Subdomains
Classes
Dependencies
- io
Source
Frequently Asked Questions
What does config.go do?
config.go is a source file in the fiber codebase, written in go. It belongs to the FiberCore domain, Adapters subdomain.
What functions are defined in config.go?
config.go defines 6 function(s): Config, bool, c, configDefault, error, output.
What does config.go depend on?
config.go imports 1 module(s): io.
Where is config.go in the architecture?
config.go is located at middleware/logger/config.go (domain: FiberCore, subdomain: Adapters, directory: middleware/logger).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free