dbhowell / pino-cloudwatch

AWS CloudWatch Logs transport for pino
MIT License
38 stars 13 forks source link

Fixed missing default interval for Stream usage #46

Open zygos opened 2 years ago

zygos commented 2 years ago

I stumbled upon an issue where pino-cloudwatch as a Writable Stream would result in no reported events. That's because the default interval is only set when running through bin/pino-cloudwatch.js and not when it's directly imported. undefined interval would result in a failed this.interval > 0 check in chunky-stream resulting in skipped setTimeout and thus no reported events. Adding a default value fixed the issue.