Skip to content

Commit

Permalink
fix: zapr test
Browse files Browse the repository at this point in the history
Removing line breaks from messages

Signed-off-by: aimuz <mr.imuz@gmail.com>
  • Loading branch information
aimuz committed May 17, 2023
1 parent ef55402 commit ec6347c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions examples/flushing/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
myfile.log
12 changes: 6 additions & 6 deletions test/zapr.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,22 +171,22 @@ I output.go:<LINE>] "odd WithValues" keyWithoutValue="(MISSING)"

// klog.Info
`I output.go:<LINE>] "helloworld\n"
`: `{"caller":"test/output.go:<LINE>","msg":"helloworld\n","v":0}
`: `{"caller":"test/output.go:<LINE>","msg":"helloworld","v":0}
`,

// klog.Infoln
`I output.go:<LINE>] "hello world\n"
`: `{"caller":"test/output.go:<LINE>","msg":"hello world\n","v":0}
`: `{"caller":"test/output.go:<LINE>","msg":"hello world","v":0}
`,

// klog.Error
`E output.go:<LINE>] "helloworld\n"
`: `{"caller":"test/output.go:<LINE>","msg":"helloworld\n"}
`: `{"caller":"test/output.go:<LINE>","msg":"helloworld"}
`,

// klog.Errorln
`E output.go:<LINE>] "hello world\n"
`: `{"caller":"test/output.go:<LINE>","msg":"hello world\n"}
`: `{"caller":"test/output.go:<LINE>","msg":"hello world"}
`,

// klog.ErrorS
Expand All @@ -201,12 +201,12 @@ I output.go:<LINE>] "odd WithValues" keyWithoutValue="(MISSING)"

// klog.V(1).Info
`I output.go:<LINE>] "hellooneworld\n"
`: `{"caller":"test/output.go:<LINE>","msg":"hellooneworld\n","v":1}
`: `{"caller":"test/output.go:<LINE>","msg":"hellooneworld","v":1}
`,

// klog.V(1).Infoln
`I output.go:<LINE>] "hello one world\n"
`: `{"caller":"test/output.go:<LINE>","msg":"hello one world\n","v":1}
`: `{"caller":"test/output.go:<LINE>","msg":"hello one world","v":1}
`,

// klog.V(1).ErrorS
Expand Down

0 comments on commit ec6347c

Please sign in to comment.