https://github.com/secondtruth/go-logger-logrus
📖 Logrus implementation of the Go Logger interface
https://github.com/secondtruth/go-logger-logrus
interface interoperability logging logrus
Last synced: 7 months ago
JSON representation
📖 Logrus implementation of the Go Logger interface
- Host: GitHub
- URL: https://github.com/secondtruth/go-logger-logrus
- Owner: secondtruth
- License: mit
- Created: 2024-01-18T23:32:20.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-10T16:54:07.000Z (about 2 years ago)
- Last Synced: 2025-07-04T18:02:50.869Z (7 months ago)
- Topics: interface, interoperability, logging, logrus
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Go Logger interface – Logrus implementation
This library provides an implementation of the [Logger interface](https://github.com/secondtruth/go-logger)
for [Logrus](https://github.com/sirupsen/logrus).
## Installation
To install `go-logger-logrus`, use the following command:
go get -u github.com/secondtruth/go-logger-logrus
## Quick Start
```go
package main
import (
"os"
logruslogger "github.com/secondtruth/go-logger-logrus/logger"
"github.com/secondtruth/go-logger/logger"
"github.com/sirupsen/logrus"
)
func main() {
logrusLog := logrus.New()
logrusLog.SetFormatter(&logrus.JSONFormatter{})
logrusLog.SetOutput(os.Stdout)
logrusLog.SetLevel(logrus.DebugLevel)
log, _ := logruslogger.NewLogrusLogger(logrusLog)
log.WithFields(logger.Fields{
"foo": "bar",
}).Info("message")
}
```