mirror of
https://github.com/go-micro/go-micro.git
synced 2025-01-05 10:20:53 +02:00
594 B
594 B
logrus
logrus logger implementation for go-micro meta logger.
Usage
import (
"os"
"github.com/sirupsen/logrus"
"github.com/asim/go-micro/v3/logger"
)
func ExampleWithOutput() {
logger.DefaultLogger = NewLogger(logger.WithOutput(os.Stdout))
logger.Infof(logger.InfoLevel, "testing: %s", "Infof")
}
func ExampleWithLogger() {
l:= logrus.New() // *logrus.Logger
logger.DefaultLogger = NewLogger(WithLogger(l))
logger.Infof(logger.InfoLevel, "testing: %s", "Infof")
}