Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/x-punch/gin-logger

Gin middleware/handler to logger url path, which support filter http status code.
https://github.com/x-punch/gin-logger

Last synced: about 1 month ago
JSON representation

Gin middleware/handler to logger url path, which support filter http status code.

Awesome Lists containing this project

README

        

# gin-logger
Gin middleware used to logger url request, which support advanced filter.

# Usage
```
app.Use(logger.DefaultLogger())
```
```
app.Use(logger.Logger(logger.Config{Level: "WARN", SkipMethods: []string{"OPTIONS"}, SkipURLs: []string{"/test"}, SkipURLRegexp: regexp.MustCompile("/swagger/*")}))
```