mirror of https://github.com/gofiber/fiber.git
This commit introduces predefined log formats for the logger middleware, enhancing its flexibility and ease of use. Users can now specify formats like "common", "combined", and "json" in addition to the default format. Changes: - Added a `format.go` file to store predefined log format constants. - Updated `config.go` to include documentation for the `Format` configuration option, explaining the available placeholders and predefined formats. - Modified `logger.go` to utilize the predefined formats based on the `Format` configuration. - Added a new test case `Test_Logger_CLF` in `logger_test.go` to verify the "common" log format. |
||
---|---|---|
.. | ||
config.go | ||
data.go | ||
default_logger.go | ||
format.go | ||
logger.go | ||
logger_test.go | ||
tags.go | ||
template_chain.go | ||
utils.go |