diff --git a/util/ui/request_logger_file_writer.go b/util/ui/request_logger_file_writer.go index a2d7aca1e2b..347c556d6cf 100644 --- a/util/ui/request_logger_file_writer.go +++ b/util/ui/request_logger_file_writer.go @@ -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 } diff --git a/util/ui/request_logger_file_writer_test.go b/util/ui/request_logger_file_writer_test.go index 780497bec0d..40f768f64c4 100644 --- a/util/ui/request_logger_file_writer_test.go +++ b/util/ui/request_logger_file_writer_test.go @@ -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")) }) })