Go to file
Vasiliy Tolstov e3af5dd4f8 update for latest micro
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-01-12 09:30:54 +03:00
.github use own fork 2021-01-10 15:21:29 +03:00
go.mod update for latest micro 2021-01-12 09:30:54 +03:00
go.sum update for latest micro 2021-01-12 09:30:54 +03:00
LICENSE add LICENSE 2021-01-10 15:39:34 +03:00
logrus_test.go update for latest micro 2021-01-12 09:30:54 +03:00
logrus.go update for latest micro 2021-01-12 09:30:54 +03:00
options.go use own fork 2021-01-10 15:21:29 +03:00
README.md use own fork 2021-01-10 15:21:29 +03:00

logrus

logrus logger implementation for go-micro meta logger.

Usage

import (
	"os"
	"github.com/sirupsen/logrus"
	"github.com/micro/go-micro/v2/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")
}