https://github.com/danielgatis/go-logrus-adapters
A collection of adapters for logrus pkg.
https://github.com/danielgatis/go-logrus-adapters
go golang logging logrus logrus-adapter
Last synced: 4 months ago
JSON representation
A collection of adapters for logrus pkg.
- Host: GitHub
- URL: https://github.com/danielgatis/go-logrus-adapters
- Owner: danielgatis
- License: mit
- Created: 2021-12-21T23:59:32.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-01-23T02:07:28.000Z (over 1 year ago)
- Last Synced: 2025-01-23T02:34:17.616Z (over 1 year ago)
- Topics: go, golang, logging, logrus, logrus-adapter
- Language: Go
- Homepage:
- Size: 75.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Go - Logrus Adapters
[](https://goreportcard.com/report/github.com/danielgatis/go-logrus-adapters)
[](https://raw.githubusercontent.com/danielgatis/go-logrus-adapters/master/LICENSE)
[](https://godoc.org/github.com/danielgatis/go-logrus-adapters)
A collection of adapters for logrus pkg.
## Install
```bash
go get -u github.com/danielgatis/go-logrus-adapters
```
And then import the package in your code:
```go
import "github.com/danielgatis/go-logrus-adapters"
```
### Example
```go
package main
import (
"net/http"
adapters "github.com/danielgatis/go-logrus-adapters"
"github.com/labstack/echo/v4"
"github.com/sirupsen/logrus"
)
func main() {
e := echo.New()
e.Logger = adapters.NewEchoLogAdapter(logrus.StandardLogger())
e.GET("/", func(c echo.Context) error {
return c.String(http.StatusOK, "Hello, World!\n")
})
e.Logger.Fatal(e.Start(":1323"))
}
```
### License
Copyright (c) 2021-present [Daniel Gatis](https://github.com/danielgatis)
Licensed under [MIT License](./LICENSE)
### Buy me a coffee
Liked some of my work? Buy me a coffee (or more likely a beer)
