Closed bensymonds closed 4 years ago
@stevenharman Thanks for the review. FYI I amended the last commit to add a changelog entry. I'm going to go ahead and merge this. I actually have another PR I want to open, but after that I'll be bugging you for a release 😄
The current logic covers the case when the log data is already a
String
instance, but not when the data is some other object that, when interpolated into the log string, results in a string containing spaces.The example that led me here is where an exception is logged and the exception's message contains spaces. The exception gets interpolated into the string and has
to_s
called on it.Exception#to_s
returns the message, so the message (with its spaces) go into the log line, but it's bypassed the logic that adds quotes.See the commits for more details. I slipped in a few cleanups and added some tests too.