Will winston affect on my application performance ?

67 views
Skip to first unread message

Sac King

unread,
Jul 15, 2015, 7:53:01 AM7/15/15
to nod...@googlegroups.com

Hello,

I am working on a application, using winston nodejs as logging framework. I have a doubt, whether winston logging is blocking my application thread ? As we know node is single threaded, i have put a debug statement using winston and using File transport for it. I want to know whether, will it affect on my application performance ?

Aikar

unread,
Aug 18, 2015, 8:37:32 PM8/18/15
to nodejs
It would require them going out of their way to make winston blocking, and serve no purpose.

As their tagline says "async logging library". No, winston is not blocking.

Though, note that as with any piece of code, it adds onto the CPU. If you log in high impact sections of code and pass meta values, it could spend a significant amount of time to process the logs and the util.inspect calls on meta will add up.

So unless you're logging in a hot section of code and using meta, don't prematurely optimize.
Reply all
Reply to author
Forward
0 new messages