Hi Rodion,
Is it correct that multiline logs always end in empty line and no empty lines can be seen in the multiline? If that’s correct use TokenSplitter or RegexSplitter to split stream of loglines into individual messages. Then use MultiDecoder with cascade strategy set to “first-wins” to decode different formats of log lines. The subsequent decoders are going to be plain LPEG-based lua decoders — one for every format of your log messages (or PayloadRegexDecoder but it is said to be slower and not recommended). For testing LPEG grammar there is a great online tool http://lpeg.trink.com/ which is really helpful in debugging. Regards, Timur On 2 Feb 2016 at 21:05:17, Rodion Vynnychenko ([email protected]) wrote: Hello, is it possible to make heka understand multi-line stack traces node.js produces? For example this script: var e = new (require('events').EventEmitter)(); for (var i = 0; i < 20; i++) { e.on('test', function() {}); } process.stderr.write("Something normal written to stderr\n"); console.log(a()); would produce stderr output along the lines of: (node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit. Trace at EventEmitter.addListener (events.js:160:15) at Object.<anonymous> (/tmp/test.js:4:4) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:902:3 Something normal written to stderr /tmp/test.js:7 console.log(a()); ^ ReferenceError: a is not defined at Object.<anonymous> (/tmp/test.js:7:13) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:902:3 What would be the best way to configure heka in a way that would capture the about output in 3 messages instead of one per line? -- Cheers, Rodion _______________________________________________ Heka mailing list [email protected] https://mail.mozilla.org/listinfo/heka
_______________________________________________ Heka mailing list [email protected] https://mail.mozilla.org/listinfo/heka

