Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

formatter: Add add_newline parameter to remove '\n' from the result #1420

Merged
merged 6 commits into from
Jan 19, 2017

Conversation

repeatedly
Copy link
Member

KVS or Queue like plugins don't need \n in the json formatted result.
This parameter controlls \n for such plugins.

@repeatedly repeatedly self-assigned this Jan 17, 2017
@repeatedly repeatedly requested a review from tagomoris January 17, 2017 05:35
@repeatedly repeatedly added the enhancement Feature request or improve operations label Jan 17, 2017
@repeatedly
Copy link
Member Author

@tagomoris Could you check this patch?

Copy link
Member

@tagomoris tagomoris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The feature looks good to me.
But it seems very common thing for all formatters.
How about to add the same parameter in csv/hash/ltsv/single_value/tsv plugins?

@repeatedly
Copy link
Member Author

@tagomoris Good idea. I will add this parameter to other text formatters.

@repeatedly
Copy link
Member Author

repeatedly commented Jan 19, 2017

Added add_newline paramter to ltsv, hash and csv formatters. single_value has already had this parameter.

moris says tsv formatter is for out_exec plugin and current implementation is not good for other cases, e.g. don't espace \t / quote field. So I exclude tsv from this patch.
CSV with \t delimiter is better for formatter plugin usecase.

@tagomoris Could you re-check this?

@repeatedly repeatedly changed the title formatter_json: Add add_newline parameter to remove '\n' from the result formatter: Add add_newline parameter to remove '\n' from the result Jan 19, 2017
@tagomoris
Copy link
Member

LGTM.

@repeatedly repeatedly merged commit b144df4 into master Jan 19, 2017
@repeatedly repeatedly deleted the json-formatter-without-nl branch January 19, 2017 20:46
repeatedly added a commit that referenced this pull request Feb 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request or improve operations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants