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

add new csv formatter #489

Merged
merged 2 commits into from
Nov 24, 2014
Merged

Conversation

takumakanari
Copy link
Contributor

This pull request is adding new formatter named 'csv' to format log in csv(or tsv) style.

We can config like as follows:

format csv
fields name,age,message

We can output in also tsv style by setting 'delimiter':

format csv
delimiter \t
fields name,age,message

@tagomoris
Copy link
Member

Code looks good.
But I wonder whether fluentd built-in formatter should have CSV formatter or not.
Of course, we can publish CSV formatter plugin on rubygems.

assert_equal [], @formatter.fields
end

def test_config_params_with_customized_delimiters
Copy link
Member

Choose a reason for hiding this comment

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

Could you use data approach instead of each assert in one test?

@repeatedly
Copy link
Member

I commented and others are looks OK.

I think CSV/TSV is popular and Ruby has CSV library in standard library.
So I think including CSV formatter seems no problem.

@repeatedly repeatedly added the feature request *Deprecated Label* Use enhancement label in general label Nov 23, 2014
@takumakanari
Copy link
Contributor Author

I fixed tests, could you review it again?

repeatedly added a commit that referenced this pull request Nov 24, 2014
@repeatedly repeatedly merged commit 3874866 into fluent:master Nov 24, 2014
repeatedly added a commit that referenced this pull request Nov 25, 2014
@sonots sonots added the v0.10 label Nov 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request *Deprecated Label* Use enhancement label in general
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants