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

View File

@@ -4,9 +4,11 @@ import (
"context"
"fmt"
"github.com/spf13/cobra"
"github.com/zrepl/zrepl/logger"
"os"
"os/signal"
"syscall"
"time"
)
// daemonCmd represents the daemon command
@@ -33,7 +35,8 @@ func doDaemon(cmd *cobra.Command, args []string) {
os.Exit(1)
}
log := conf.Global.logging.MakeLogrus()
log := logger.NewLogger(conf.Global.logging.Outlets, 1*time.Second)
log.Debug("starting daemon")
ctx := context.WithValue(context.Background(), contextKeyLog, log)
ctx = context.WithValue(ctx, contextKeyLog, log)