* feat(logger): Add predefined log formats
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.
* feat(logger): Use predefined formats and fix default format
This commit updates the logger middleware to utilize the predefined log formats introduced in a previous commit. It also fixes the default format to use the `FormatDefault` constant.
Changes:
- Updated `config.go` to use `FormatDefault` constant for the default format.
- Updated `default_logger.go` to use `FormatDefault` constant for the default format.
- Added new test cases in `logger_test.go` to verify the "common", "combined" and "json" log formats.
- Updated `format.go` to add newline character to the end of the default format.
* feat(logger): Document and exemplify predefined formats
* fix(logger): Improve test assertions based on golangci-lint
* docs(logger): Improve documentation and formatting logger.md based on markdownlint-cli2
* docs(logger): Improve documentation based on markdownlint-cli2
* fix(logger): Improve combined and JSON format tests
* feat(logger): Add ECS log format
* feat(logger): Add CustomFormat option
This commit introduces a `CustomFormat` option to the `Config` struct, allowing users to specify a predefined format (like "common", "combined", "json", or "ecs")
* feat(logger): Add ECS log format to examples and config
* docs(logger): Update examples in whats_new.md
* feat(logger): Remove CustomFormat option and renamed Format consts
- Removed `CustomFormat` field from `Config`.
- Removed `LoggerConfig` map.
- Rename predefined formats constants.
* docs(logger): Update documentation and examples after format refactor
---------
Co-authored-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
* Add support for consistent documentation using markdownlint
* Only run workflow during changes to markdown files
* Fix more inconsistencies
* Fixes to markdown under .github/
* More fixes
* Apply suggestions from code review
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* Fix typo in limiter docs
* Add missing space before code-block
* Add check for dead-links
* Add write-good
* Remove legacy README files
* Fix glob for skipping .md files
* Use paths-ignore instead
---------
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* [v3 Maintenance]: Consolidate and Document Core Changes in v3
* [v3 Maintenance]: Consolidate and Document Core Changes in v3
* [v3 Maintenance]: Consolidate and Document Core Changes in v3
* [v3 Maintenance]: Consolidate and Document Core Changes in v3
* [v3 Maintenance]: Consolidate and Document Core Changes in v3
* [v3 Maintenance]: Consolidate and Document Core Changes in v3
* [v3 Maintenance]: Consolidate and Document Core Changes in v3
* [v3 Maintenance]: Consolidate and Document Core Changes in v3
* [v3 Maintenance]: Consolidate and Document Core Changes in v3
* [v3 Maintenance]: Consolidate and Document Core Changes in v3
* [v3 Maintenance]: Consolidate and Document Core Changes in v3
* [v3 Maintenance]: Consolidate and Document Core Changes in v3
* [v3 Maintenance]: Consolidate and Document Core Changes in v3
* [v3 Maintenance]: Consolidate and Document Core Changes in v3
* [v3 Maintenance]: Consolidate and Document Core Changes in v3
* [v3 Maintenance]: Consolidate and Document Core Changes in v3
* [v3 Maintenance]: Consolidate and Document Core Changes in v3
* [v3 Maintenance]: Consolidate and Document Core Changes in v3
* [v3 Maintenance]: Consolidate and Document Core Changes in v3
* [v3 Maintenance]: Consolidate and Document Core Changes in v3
* [v3 Maintenance]: Consolidate and Document Core Changes in v3
* [v3 Maintenance]: Consolidate and Document Core Changes in v3