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

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

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())
```