Awesome
Logrus
A logrus implementation of log.Logger
.
For more on the interface and other implementations, see the log README.
package main
import (
logr "github.com/go-log/logrus"
"github.com/sirupsen/logrus"
)
func main {
l := logr.WithFields(logrus.Fields{
"foo": "bar",
})
l.Log("a log line")
}
You can also use print.New
to convert logrus loggers to log.Logger
.
For an example, see here.