repositorypackage
1.2.0
Repository: https://github.com/lwangrabbit/logrusr.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# README
Logrusr
A logr implementation using logrus.
Usage
import (
"github.com/sirupsen/logrus"
"github.com/bombsimon/logrusr"
"github.com/go-logr/logr"
)
func main() {
var log logr.Logger
log = logrusr.NewLogger(logrus.New())
log.Info("Logr in action!", "the answer", 42)
}
For more details, see example.
Implementation details
The NewLogger method takes a logrus.FieldLogger
interface as input which means
this works with both logrus.Logger
and logrus.Entry
. This is currently a
quite naive implementation in early state. Use with caution.