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

Added PIPE field separator #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This module provides features to:
* format whole data as serialized JSON, single attribute or separated multi attributes
* include time as line header (formatted by time_format in UTC(default) or localtime), or not
* include tag as line header (remove_prefix available), or not
* change field separator (TAB(default), SPACE, COMMA or SOH(\\001))
* change field separator (TAB(default), SPACE, COMMA, SOH(\\001) or PIPE)
* add new line as termination, or not

## Usage
Expand Down Expand Up @@ -74,7 +74,7 @@ Provided configurations are below:
* 'json': output by JSON
* 'ltsv': output by LTSV, see: http://ltsv.org/
* 'attr:key1,key2,key3': values of 'key1' and 'key2' and ..., with separator specified by 'field_separator'
* field\_separator [TAB/SPACE/COMMA/SOH]
* field\_separator [TAB/SPACE/COMMA/SOH/PIPE]
* add_newline [yes/no]
* time_format
* format string like '%Y-%m-%d %H:%M:%S' or you want
Expand Down
1 change: 1 addition & 0 deletions lib/fluent/mixin/plaintextformatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def configure(conf)
when /SPACE/i then ' '
when /COMMA/i then ','
when /SOH/i then "\x01"
when /PIPE/i then '|'
else "\t"
end

Expand Down