When a controller takes a file upload it produces binary data in the resulting controller parameters. Those parameters are captured in the controller_call event which is subsequently encoded into JSON. The binary data is ASCII-8BIT which contains characters outside of the defined valid set for UTF-8, and it throws this error:
Could not log "start_processing.action_controller" event. Encoding::UndefinedConversionError: "\xD0" from ASCII-8BIT to UTF-8
As part of hash preparation for Timber::LogEvent we should drop keys with binary data.
When a controller takes a file upload it produces binary data in the resulting controller parameters. Those parameters are captured in the
controller_call
event which is subsequently encoded into JSON. The binary data isASCII-8BIT
which contains characters outside of the defined valid set forUTF-8
, and it throws this error:As part of hash preparation for
Timber::LogEvent
we should drop keys with binary data.