pinojs / sonic-boom

Extremely fast utf8 only stream implementation
MIT License
261 stars 41 forks source link

feat: introduce write event #140

Closed feugy closed 2 years ago

feugy commented 2 years ago

What's in there?

Hi Pino community!

In order to implement log rotation based on SonicBoom (original issue, I would need a way to track bytes written to the underlying file.

Here is the PR for implementing a file rotation transport that can roll either on time or size.

The write event exposes this information without compromising performance.