From 2f3e77af20060fadff536c45ad4886cba650944c Mon Sep 17 00:00:00 2001 From: Jingwei Date: Mon, 10 Jun 2019 10:41:21 +0800 Subject: [PATCH] refactor With method of Logger --- logger.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/logger.go b/logger.go index 4d63c94..046e432 100644 --- a/logger.go +++ b/logger.go @@ -22,8 +22,9 @@ func NewLoggerOf(component string) *Logger { // With adds a variadic number of fields to the logging context. // see https://github.com/uber-go/zap/blob/v1.10.0/sugar.go#L91 -func (l *Logger) With(args ...interface{}) { +func (l *Logger) With(args ...interface{}) *Logger { l.zapSugar = l.zapSugar.With(args...) + return l } // Debug package sugar of zap