Zap Hook for Logrus
Use this hook to send logs from logrus to zap.
All levels are sent by default.
Usage
package main
import (
"io/ioutil"
zaphook "github.com/Sytten/logrus-zap-hook"
"github.com/sirupsen/logrus"
"go.uber.org/zap"
)
func main() {
log := logrus.New()
log.ReportCaller = true // So Zap reports the right caller
log.SetOutput(ioutil.Discard) // Prevent logrus from writing its logs
logger, _ := zap.NewDevelopment()
hook, _ := zaphook.NewZapHook(logger)
log.Hooks.Add(hook)
}