https://github.com/plutov/echo-logrus
Echo middleware to log using logrus pkg
https://github.com/plutov/echo-logrus
Last synced: 23 days ago
JSON representation
Echo middleware to log using logrus pkg
- Host: GitHub
- URL: https://github.com/plutov/echo-logrus
- Owner: plutov
- License: mit
- Created: 2017-11-23T05:23:03.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-04-11T18:48:56.000Z (about 1 year ago)
- Last Synced: 2025-03-27T15:21:29.527Z (about 1 month ago)
- Language: Go
- Size: 9.77 KB
- Stars: 16
- Watchers: 1
- Forks: 22
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### echo-logrus
Middleware echo-logrus is a [logrus](https://github.com/sirupsen/logrus) logger support for [echo](https://github.com/labstack/echo).
`v3.0` tag supports v3.
`v4.0` tag supports v4.#### Install
```sh
go get -u github.com/plutov/echo-logrus
```#### Usage
import package
```go
echologrus "github.com/plutov/echo-logrus"
```define new logrus
```go
echologrus.Logger = logrus.New()
e.Logger = echologrus.GetEchoLogger()
e.Use(echologrus.Hook())
```