Processing multiline data


(Pauer Gergely) #1

Hello,

I want to process an exception log file but the problem is that the data is multiline with exception message, datetime etc in the first row and further random number of rows that is the stack trace. I want to pass a file containing such exeptions to logstash, but it passes it row by row. Is it possible to pass one exception as a unit?

DummyExample:
InsufficientFundsException - 2017-01-27
at Acc.withdraw(Whatever.java:25)
at Bank.main(WhatIsThis.java:13)

Thanks,
Best Regards


(Christian Dahlqvist) #2

Always try to assemble the multiline messages as close to the source as possible. If you are using a file input in Logstash, you can use the multiline codec to assemble messages as they are read.


(Pauer Gergely) #3

Thank you very much that helped a lot. Should've read the documentation first. :sweat_smile:


(system) #4

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