From ec6347c4f8d5abe5665be05e8a75edb8e55e3c49 Mon Sep 17 00:00:00 2001 From: aimuz Date: Wed, 17 May 2023 09:56:27 +0800 Subject: [PATCH] fix: zapr test Removing line breaks from messages Signed-off-by: aimuz --- examples/flushing/.gitignore | 1 + test/zapr.go | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 examples/flushing/.gitignore diff --git a/examples/flushing/.gitignore b/examples/flushing/.gitignore new file mode 100644 index 000000000..2383fed92 --- /dev/null +++ b/examples/flushing/.gitignore @@ -0,0 +1 @@ +myfile.log diff --git a/test/zapr.go b/test/zapr.go index 7b1594429..6c7e809fb 100644 --- a/test/zapr.go +++ b/test/zapr.go @@ -171,22 +171,22 @@ I output.go:] "odd WithValues" keyWithoutValue="(MISSING)" // klog.Info `I output.go:] "helloworld\n" -`: `{"caller":"test/output.go:","msg":"helloworld\n","v":0} +`: `{"caller":"test/output.go:","msg":"helloworld","v":0} `, // klog.Infoln `I output.go:] "hello world\n" -`: `{"caller":"test/output.go:","msg":"hello world\n","v":0} +`: `{"caller":"test/output.go:","msg":"hello world","v":0} `, // klog.Error `E output.go:] "helloworld\n" -`: `{"caller":"test/output.go:","msg":"helloworld\n"} +`: `{"caller":"test/output.go:","msg":"helloworld"} `, // klog.Errorln `E output.go:] "hello world\n" -`: `{"caller":"test/output.go:","msg":"hello world\n"} +`: `{"caller":"test/output.go:","msg":"hello world"} `, // klog.ErrorS @@ -201,12 +201,12 @@ I output.go:] "odd WithValues" keyWithoutValue="(MISSING)" // klog.V(1).Info `I output.go:] "hellooneworld\n" -`: `{"caller":"test/output.go:","msg":"hellooneworld\n","v":1} +`: `{"caller":"test/output.go:","msg":"hellooneworld","v":1} `, // klog.V(1).Infoln `I output.go:] "hello one world\n" -`: `{"caller":"test/output.go:","msg":"hello one world\n","v":1} +`: `{"caller":"test/output.go:","msg":"hello one world","v":1} `, // klog.V(1).ErrorS