You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Writing to os.File is goroutine-safe, but if you are using a custom Output that is not goroutine-safe, make sure to implement locking to properly serialize writes.
132
+
Writing to os.File is goroutine-safe, but if you are using a custom Stream that is not goroutine-safe, make sure to implement locking to properly serialize writes.
133
133
:::
134
134
135
135
## Config
@@ -138,31 +138,30 @@ Writing to os.File is goroutine-safe, but if you are using a custom Output that
| Next |`func(fiber.Ctx) bool`| Next defines a function to skip this middleware when returned true. |`nil`|
142
-
| Done |`func(fiber.Ctx, []byte)`| 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. |`nil`|
141
+
| Next |`func(fiber.Ctx) bool`| Next defines a function to skip this middleware when returned true. |`nil`|
142
+
| Skip |`func(fiber.Ctx) bool`| Skip is a function to determine if logging is skipped or written to Stream. |`nil`|
143
+
| Done |`func(fiber.Ctx, []byte)`| Done is a function that is called after the log string for a request is written to Stream, and pass the log string as parameter. |`nil`|
143
144
| CustomTags |`map[string]LogFunc`| tagFunctions defines the custom tag action. |`map[string]LogFunc`|
144
145
| Format |`string`| Format defines the logging tags. |`[${time}] ${ip} ${status} - ${latency} ${method} ${path} ${error}\n`|
145
146
| TimeFormat |`string`| TimeFormat defines the time format for log timestamps. |`15:04:05`|
146
147
| TimeZone |`string`| TimeZone can be specified, such as "UTC" and "America/New_York" and "Asia/Chongqing", etc |`"Local"`|
147
148
| TimeInterval |`time.Duration`| TimeInterval is the delay before the timestamp is updated. |`500 * time.Millisecond`|
148
-
|Output|`io.Writer`|Output is a writer where logs are written. |`os.Stdout`|
149
+
|Stream|`io.Writer`|Stream is a writer where logs are written. |`os.Stdout`|
149
150
| LoggerFunc |`func(c fiber.Ctx, data *Data, cfg Config) error`| Custom logger function for integration with logging libraries (Zerolog, Zap, Logrus, etc). Defaults to Fiber's default logger if not defined. |`see default_logger.go defaultLoggerInstance`|
150
151
| DisableColors |`bool`| DisableColors defines if the logs output should be colorized. |`false`|
151
-
| enableColors |`bool`| Internal field for enabling colors in the log output. (This is not a user-configurable field) | - |
152
-
| enableLatency |`bool`| Internal field for enabling latency measurement in logs. (This is not a user-configurable field) | - |
153
-
| timeZoneLocation |`*time.Location`| Internal field for the time zone location. (This is not a user-configurable field) | - |
0 commit comments