Skip to content

Commit

Permalink
📚 Doc: add LoggerFunc and Logger to middleware logger
Browse files Browse the repository at this point in the history
  • Loading branch information
haochunchang committed Oct 5, 2024
1 parent b1b92c6 commit b5aa388
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/middleware/logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ Writing to os.File is goroutine-safe, but if you are using a custom Output that
| TimeZone | `string` | TimeZone can be specified, such as "UTC" and "America/New_York" and "Asia/Chongqing", etc | `"Local"` |
| TimeInterval | `time.Duration` | TimeInterval is the delay before the timestamp is updated. | `500 * time.Millisecond` |
| Output | `io.Writer` | Output is a writer where logs are written. | `os.Stdout` |
| LoggerFunc | `func(c fiber.Ctx, data *Data, cfg Config) error` | 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. | `see default_logger.go defaultLoggerInstance` |
| Logger | `fiberlog.AllLogger` | | |
| DisableColors | `bool` | DisableColors defines if the logs output should be colorized. | `false` |
| enableColors | `bool` | Internal field for enabling colors in the log output. (This is not a user-configurable field) | - |
| enableLatency | `bool` | Internal field for enabling latency measurement in logs. (This is not a user-configurable field) | - |
Expand Down

0 comments on commit b5aa388

Please sign in to comment.