Skip to content

added header option#9

Open
gmoskovicz wants to merge 1 commit intologstash-plugins:mainfrom
gmoskovicz:master
Open

added header option#9
gmoskovicz wants to merge 1 commit intologstash-plugins:mainfrom
gmoskovicz:master

Conversation

@gmoskovicz
Copy link
Copy Markdown

@gmoskovicz gmoskovicz commented Aug 3, 2016

Added header option for the output.

Fixes #8

@ph
Copy link
Copy Markdown
Contributor

ph commented Aug 8, 2016

@andrewvc Can I ping you with that? I think to make it work we need to make this plugin threadsafe.

@gmoskovicz
Copy link
Copy Markdown
Author

FYI: @GlenRSmith

@gmoskovicz
Copy link
Copy Markdown
Author

@andrewvc @ph any news on this?

path = event.sprintf(@path)

@csv_options[:write_headers] = !File.exist?(path) || File.zero?(path)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It will add the header before each record in the csv. Example
A,B,C
1,2,3
A,B,C
4,5,6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants