Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Logger ¶
func Logger(timeFormat string, utc bool) gin.HandlerFunc
Logger returns a gin.HandlerFunc (middleware) that logs requests using zerolog.
Requests with errors are logged using log.Err(). Requests without errors are logged using log.Info().
It receives:
- A time package format string (e.g. time.RFC3339).
- A boolean stating whether to use UTC time zone or local.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.