Does the multiline codec plugin in Logstash include newline characters in the output string?


I'm wondering if the multiline codec plugin in Logstash includes newlines in the output? I want to use regex on the output and this is important to understand in order to design my regex and have it perform well.

Looking at the documentation at I don't see any mention of this. FWIW I think the behavior should be documented.



Yes, it does. With this config

                codec => multiline { 
                        pattern => "^}"
                        negate => true 
                        what => next 
output { stdout { codec => rubydebug } }

and this input


the messages you get contain 1 newline

       "message" => "{\n}",
          "tags" => [
        [0] "multiline"


Awesome, thank you!

(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.