mcollina / pino-roll

A Pino transport that automatically rolls your log files
MIT License
41 stars 11 forks source link

pino-roll Is it based on main thread or sub-thread? #57

Closed jinxiaoman closed 3 months ago

jinxiaoman commented 12 months ago

I just learned about him and it’s cool. Before, I created a sub-thread fs to write by myself. I would like to ask whether pino-roll is a sub-thread or the main thread. If it is the main thread, will there be any performance problems when writing a large number of logs?

GuyAgiv commented 3 months ago

pino-roll is a variant of transport. Transports mechanism ran on a worker thread by its nature, so for your question, No it doesn't run on the main thread (and that's a good thing)

mcollina commented 3 months ago

it can also run on the main thread if you want, you can just use it as a stream.