
Fastify and Pino with Matteo Collina
PodRocket - A web development podcast from LogRocket
00:00
How to Use Multi-Threaded Logging in Your Enterprise
The main process, write the logs to a shared array buffer. And then those logs are then picked up by the, by the writer and these then ship them externally. The fundamental reason that we can, we need to use two threads. One is because we don't want the main thread to be delaying the response to then users to log in. But the second one is to handle crashes. So if you're doing asynchronous logging, those logs are gone because you can't, they've not been sent. When it crashes, it's gone. It's done. You need to leave the process some time to ship these things out. With these multi-threaded system is actually really great
Transcript
Play full episode