MarkLogic log files denote mulitple lines by printing the lines with the same timestamp down to the millisecond. You can see that in this snippet:
2014-05-09 18:47:33.844 Info: Dev_Xdbc: [/file-store/get-file.xqy] url=/2.16.840.1.113883.3.21/d3c787ef-2244-48e4-a8a9-82ae5e7ad47a-296 tenant=perform001
2014-05-09 18:47:34.101 Notice: Dev_Xdbc: XDMP-MODNOTFOUND: (err:XQST0059) Module /2.6.0/utils/no-fn.xqy not found
2014-05-09 18:47:34.101 Notice: Dev_Xdbc: [1.0-ml]
So here the two lines starting with 2014-05-09 18:47:34.101
are part of the same log message.
I'm not sure how to tell Logstash that lines starting with the same string are to be grouped together. The multiline codec/filter does not seem to support combining lines in this way. Is there a way to do this?
This seemed like an interesting problem, so I wrote a plugin for it, based loosely on the multiline plugin, but there are some complications. There is a bug in the core logstash code that needs to be fixed for the plugin though.
Extract the following into lib/filters/related.rb
And then modify lib/event.rb to add the commented line