Conversation
|
I just modified this pull request a bit. I was getting similar line boundary errors with java exceptions. If a data chunk started with a normal log line, but then included more, such as a java exception stack trace, then parseLog would explode. Now, instead of converting emitLog to do line deliniation, the entire stream is split by line. I embedded (to reduce dependencies) the byline.js package to do this. Also, the whole debouncing of java lines was completely broken, so I removed that. Now java events are emitted separately by line. |
|
I'll take a look at this soon, I've found this mechanism lacking and am glad to have another set of eyes on it. One thing I can think of off the bat, I'd rather have the dependency installed via npm than embedded, would you mind changing that? |
|
Ok. I'll change it to be an npm dependency. It may be a few days before I get to it. |
Although rare (about 1 in 25 times) stderr does not alway emit it's output on line boundaries. Because the pattern depends on line boundaries, this causes some events to not be emitted.
This is especially the case for joined and left events, where the log entries the patterns are looking for are followed especially closely by other entries.
This commit explicitly breaks logs into lines before parsing them thus causing the events to be detected correctly.