docs(logger): Improve documentation based on markdownlint-cli2

pull/3359/head
edvardsanta 2025-03-18 22:55:17 -03:00
parent e647f6f94d
commit 6b8e5b3b49
2 changed files with 2 additions and 1 deletions

View File

@ -191,7 +191,7 @@ Logger provides predefined formats that you can use by name or directly by speci
| default | `FormatDefault` | `"[${time}] ${ip} ${status} - ${latency} ${method} ${path} ${error}\n"` | Fiber's default logger format. |
| common | `FormatCommonLog` | `"${ip} - - [${time}] "${method} ${url} ${protocol}" ${status} ${bytesSent}\n"` | Common Log Format (CLF) used in web server logs. |
| combined | `FormatCombined` | `"${ip} - - [${time}] "${method} ${url} ${protocol}" ${status} ${bytesSent} "${referer}" "${ua}"\n"` | CLF format plus the `referer` and `user agent` fields. |
| json | `FormatJSON` | `"{time: ${time}, ip: ${ip}, method: ${method}, url: ${url}, status: ${status}, bytesSent: ${bytesSent}}\n"` | JSON format for structured logging.
| json | `FormatJSON` | `"{time: ${time}, ip: ${ip}, method: ${method}, url: ${url}, status: ${status}, bytesSent: ${bytesSent}}\n"` | JSON format for structured logging. |
## Constants

View File

@ -957,6 +957,7 @@ app.Use(logger.New(logger.Config{
Format: "json", // or logger.FormatJSON,
}))
```
</details>
### Filesystem