vmware / fluent-plugin-vmware-loginsight

Fluentd plugin to forward logs to VMware Aria Operations for Logs
Other
10 stars 14 forks source link

If any of log fields are immutable, use its copy to utf encode. #6

Closed mohitevishal closed 5 years ago

mohitevishal commented 5 years ago

If any log message or any events/tags has any immutable strings, force_encoding("utf-8") will throw the following error while trying to change the format: [warn]: #0 force_encoding exception: RuntimeError, 'can't modify frozen String'

This fix uses a copy of string if it is immutable. Fixes #5.

Also bumped up version.

vmwclabot commented 5 years ago

@mohitevishal, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding Signed-off-by: John Doe <john.doe@email.org> to the last line of each Git commit message. The e-mail address used to sign must match the e-mail address of the Git author. Click here to view the Developer Certificate of Origin agreement.