Bunyan conditional file stream
File stream that supports a callback to determine whether the entry needs to be logged or not.
Usage
Usage example:
var conditionalFileStream = path: 'test/testfile.txt' { return entrylogIt == true; // a simple condition that tells if we need to log this line or not}; var logger = bunyan;logger;logger;
Limitations
Bunyan's reopenFileStreams()
will not reopen this stream as it only deals with built-in
'file' streams. So whenever you call reopenFileStreams()
in the logger, you should
also call reopenFileStream()
on all instances of the ConditionalFileStream
object.