I have not formatted xml files (each xml is in one line) and there is no new line. Im using multiline codec:
file {
path => "/data/xmls/**/.xml"
codec => multiline
{
pattern => "."
negate => true
what => "next"
}
}
...
filter {
xml {
...
}
...
Logstash don't parse this files because he is waiting for new line. But my question is why he is waiting for new line even in multiline codec is information about xml end tag ???
By default, each event is assumed to be one line and a line is taken to be the text before a newline character. Normally, logging will add a newline to the end of each line written.
The file input assumes a line "finished", when there is a newline character written. Otherwise the line could be read before it was fully written.
But my question is why he is waiting for new line even in multiline codec is information about xml end tag ???
The input is still a file and the multiline part is just a codec to the file input. Unfortunately I don't think there is another solution than adding a newline, for the file input to pick this up.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.