dump logrus and roll our own logger instead

This commit is contained in:
Christian Schwarz
2017-09-23 18:20:22 +02:00
parent c31ec8c646
commit e0e362c4ff
10 changed files with 491 additions and 251 deletions
+5 -3
View File
@@ -10,9 +10,10 @@ import (
"strings"
"github.com/kr/pretty"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/zrepl/zrepl/logger"
"github.com/zrepl/zrepl/zfs"
"time"
)
var testCmd = &cobra.Command{
@@ -64,8 +65,9 @@ func init() {
func testCmdGlobalInit(cmd *cobra.Command, args []string) {
log := logrus.New()
log.Formatter = NoFormatter{}
out := logger.NewOutlets()
out.Add(WriterOutlet{NoFormatter{}, os.Stdout}, logger.Info)
log := logger.NewLogger(out, 1*time.Second)
testCmdGlobal.log = log
var err error