Skip to content

GinkgoLogr does not produce newlines #1170

@erdnas

Description

@erdnas
GinkgoLogr.Info("Something")
GinkgoLogr.Info("Something else")

Outputs:

  Timeline >>
  "level"=0 "msg"="Something""level"=0 "msg"="Something else"
...

I would expect it to have a newline after each log call, for readability.

  Timeline >>
  "level"=0 "msg"="Something"
  "level"=0 "msg"="Something else"
...

If we add a newline to the printf here (or change it to println), we get newlines as desired.

ginkgo/internal/writer.go

Lines 136 to 140 in 9b5078f

func GinkgoLogrFunc(writer *Writer) logr.Logger {
return funcr.New(func(prefix, args string) {
writer.Printf("%s", args)
}, funcr.Options{})
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions