From 5536473a088bc72a4d772c4b584684dc1ea80432 Mon Sep 17 00:00:00 2001 From: Kevin Wan Date: Fri, 3 Jun 2022 19:18:07 +0800 Subject: [PATCH] Update readme.md --- core/logx/readme.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/core/logx/readme.md b/core/logx/readme.md index f05d9d09..e4acbb73 100644 --- a/core/logx/readme.md +++ b/core/logx/readme.md @@ -121,14 +121,13 @@ func (w *KafkaWriter) Write(p []byte) (n int, err error) { } func main() { - func main() { pusher := kq.NewPusher([]string{"localhost:9092"}, "go-zero") defer pusher.Close() writer := logx.NewWriter(NewKafkaWriter(pusher)) logx.SetWriter(writer) - // more code + // more code } ``` @@ -170,8 +169,8 @@ func (l *SensitiveLogger) Info(msg interface{}, fields ...logx.LogField) { } func main() { - // setup logx to make sure originalWriter not nil, - // the injected writer is only for filtering, like a middleware. + // setup logx to make sure originalWriter not nil, + // the injected writer is only for filtering, like a middleware. originalWriter := logx.Reset() writer := NewSensitiveLogger(originalWriter) @@ -183,7 +182,7 @@ func main() { Message: "bar", }) - // more code + // more code } ```