Skip to content

Commit

Permalink
Displaybody should respect new line [v8] (#3151)
Browse files Browse the repository at this point in the history
* display body should respect new line
  • Loading branch information
h0nIg authored Dec 2, 2024
1 parent 6260e37 commit c23186c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion util/ui/request_logger_file_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func newRequestLoggerFileWriter(ui *UI, lock *sync.Mutex, filePaths []string) *R

func (display *RequestLoggerFileWriter) DisplayBody([]byte) error {
for _, logFile := range display.logFiles {
_, err := logFile.WriteString(RedactedValue)
_, err := logFile.WriteString(fmt.Sprintf("%s\n", RedactedValue))
if err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions util/ui/request_logger_file_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ var _ = Describe("Request Logger File Writer", func() {

contents, err := os.ReadFile(logFile1)
Expect(err).ToNot(HaveOccurred())
Expect(string(contents)).To(Equal(RedactedValue + "\n"))
Expect(string(contents)).To(Equal(RedactedValue + "\n\n"))

contents, err = os.ReadFile(logFile2)
Expect(err).ToNot(HaveOccurred())
Expect(string(contents)).To(Equal(RedactedValue + "\n"))
Expect(string(contents)).To(Equal(RedactedValue + "\n\n"))
})
})

Expand Down

0 comments on commit c23186c

Please sign in to comment.