Dr. Egon Spengler: There's something very important I forgot to tell you.
Dr. Peter Venkman: What?
Dr. Egon Spengler: Don't cross the streams.
Dr. Peter Venkman: Why?
Dr. Egon Spengler: It would be bad.
Dr. Peter Venkman: I'm fuzzy on the whole good/bad thing. What do you mean, "bad"?
Dr. Egon Spengler: Try to imagine all life as you know it stopping instantaneously and every molecule in your body exploding at the speed of light.
Dr Ray Stantz: Total protonic reversal.
Dr. Peter Venkman: Right. That's bad. Okay. All right. Important safety tip. Thanks, Egon.
There are some situations when you do want to cross the streams, AWS CloudWatch Logs streams in this case.
$ npm install egon
This module combines multiple streams.
var params =logGroupName: 'your-log-group';egon;
Another example with
var params =logGroupName: 'your-log-group'startTime: startendTime: endstartFromHead: true;egon;
$ npm test
As noted by the major update I changed
crossStreams signature, introducing
a handler that is called for every batch of logs, the second function is called
when there are no more logs.
Removed the sorting feature, no more the need to buffer events in memory. Need to rely on an external sorting tool (/usr/bin/sort might help).
Added repository field to package.json
I've made some stupid mistakes while publishing.
Fixes a mutability bad practice that prevented to read the correct events from the streams.
Adds support for
endTime. Logs are buffed in memory.
Implements #1, allowing to pass a parameter object that will be forwarded to the