forked from fluent/fluentd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add from_encoding parameter to in_tail plugin (fluent#1067)
* Add test code to check from_encoding param Add configuration check new param "from_encoding", and test convert from input source is "Hello world" in japanese Hiragana that is encoded in cp932 to UTF-8. * Add from_encoding param to in_tail plugin Add new param "from_encoding". If "encoding" param is only specified, process is same way as ever to keep backword compatibility. If two params, "encoding" and "from_encoding" are specified, process uses ```String.encode!(to, from)```. * Specify type of encoding and from_encoding * Fix configuration encoding and from_encoding * Fix test code Add test pattern from_encoding is only specified. * Fix configure_encoding Use log instead of $log. Change the log messages so that the users are easy to understand. Return as soon as possible, if encoding parameters are not specified. * Use ConfigError instead of warnning-log I deleted 2nd log message. Changed to raise error if 'encoding' and 'from_encoding' paramters are bad cofiguration. * Fix test code Corresponding to ConfigError * Change implementation of encode statement For almost users, default setting should be faster than the setting is specified encoding.
- Loading branch information
Showing
2 changed files
with
110 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters