Skip to content

Multiline values #8

Description

@ansel1

When an attr value has newlines in it, it can make the value of the attr a little hard to scan. For example, in the below output, consider the "errorVerbose" attribute. The value of this attribute is:

boom

main.testVariousHandlers
        /Users/regan/dev/flume/v2/cmd/demo/main.go:215
main.main
        /Users/regan/dev/flume/v2/cmd/demo/main.go:78
runtime.main
        /opt/homebrew/Cellar/go/1.23.4/libexec/src/runtime/proc.go:272
runtime.goexit
        /opt/homebrew/Cellar/go/1.23.4/libexec/src/runtime/asm_arm64.s:1223
image

It's a little hard to scan, because the first line of the value ("boom") appears on the same line as the key, and the last line of the value also includes the "size" attr.

I have some sample code which sorts all multi line values to the end of the buffer, so simple values are all on a single line together, and then the multi-line values are each printed on their own line. Note how the key and the value each have their own line. I also used a different separator for them (":" instead of "="), just as an experiment. Would you consider a PR for something like this?

image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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