Open andrewvc opened 8 years ago
I wonder if we can specify this so that it's the equivalent of \r?\n
all of the time. I can't think of anyone that actually wants the \r
in there, whether they're using a file or stdin.
One first improvment would be to use java System.lineSeparator() to set the default, feasible?
Maybe we make it a setting, maybe called "line_terminator" and have valid settings of "windows", "mac", "unix", or "network" ? (windows and network are identical, \r\n; mac is \r, unix is \n)
But Mac doesn't do \r
anymore. It does \n
now. But, it is a good point.
As long as it's settable, then it really doesn't make a huge difference to me, but I think the default should really be "either of (\n|\r\n)
" or "any of (\r|\n|\r\n)
". There is an undocumented delimiter
field that serves this purpose, but I think it requires it to be the exact delimiter rather than the match:
@jordansissel this plugin already has a 'delimiter' setting. I'm really curious if it works correctly with escaped characters in the logstash config however.
Also, the only reason delimiter
is undocumented is that our doc generator hasn't run recently on this.
I think @wiibaa makes a great point, but I agree that we should look for either \r\n
or \n
. No one wants the \r
.
Some Mac apps still use \r (FileMaker) even on OS X. :/
On Monday, June 20, 2016, Chris Earle notifications@github.com wrote:
But Mac doesn't do \r anymore. It does \n now. But, it is a good point.
As long as it's settable, then it really doesn't make a huge difference to me, but I think the default should really be "either of (\n|\r\n)" or "any of (\r|\n|\r\n)". There is an undocumented delimiter field that serves this purpose, but I think it requires it to be the exact delimiter rather than the match:
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/logstash-plugins/logstash-codec-line/issues/10#issuecomment-227245170, or mute the thread https://github.com/notifications/unsubscribe/AAIC6o0ZGpvvhE9b57eM4DsrCCLWbzalks5qNurtgaJpZM4I6AdE .
When running on a windows box this should default to
\r\n
as a delimiter. This works pretty poorly ith the stdin input without this.