From 42cabfc3a14094731e696f1c17687e7583807a66 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 12 May 2020 16:29:59 -0700 Subject: [PATCH] fix: correctly add the skip option to Warningf This time I've actually tested this as best I can (without, you know, adding actual unit tests). fixes #85 --- log.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/log.go b/log.go index 0553f50..784e9e5 100644 --- a/log.go +++ b/log.go @@ -1,6 +1,5 @@ -// Package log is the logging library used by IPFS -// (https://github.com/ipfs/go-ipfs). It uses a modified version of -// https://godoc.org/github.com/whyrusleeping/go-logging . +// Package log is the logging library used by IPFS & libp2p +// (https://github.com/ipfs/go-ipfs). package log import ( @@ -41,7 +40,7 @@ func Logger(system string) *ZapEventLogger { } logger := getLogger(system) - skipLogger := logger.With(zap.AddCallerSkip(1)) + skipLogger := logger.Desugar().WithOptions(zap.AddCallerSkip(1)).Sugar() return &ZapEventLogger{ system: system,