Skip to content

Escape new lines #39

Description

@chdsbd

I'm not sure, but I think it might be a good idea to escape new line characters. This way new lines in messages don't break the output formatting in console.

This would be similar to how JSON.stringify handles new lines.

// Current behavior
logfmt.stringify({'key':'hello\nworld'}) == "key=hello\nworld"
// New behavior
logfmt.stringify({'key':'hello\nworld'}) == "key=hello\\nworld"

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