Pliny logging follows the "logfmt" pattern. logfmt is unclear on what should happen with newline characters, but given it's line-based it doesn't seem to make sense to include them in the body of the log line. I couldn't decide between removing, replacing with a space character, or escaping. In the end I went with escaping since it makes it clear to a viewer that a newline was there.
This includes a small refactor - see the commits for details.
Pliny logging follows the "logfmt" pattern. logfmt is unclear on what should happen with newline characters, but given it's line-based it doesn't seem to make sense to include them in the body of the log line. I couldn't decide between removing, replacing with a space character, or escaping. In the end I went with escaping since it makes it clear to a viewer that a newline was there.
This includes a small refactor - see the commits for details.