paytm / lgr

Generic Logger
MIT License
2 stars 7 forks source link

levels below activated levels should not take so much time/processing #9

Closed shreyagarwal closed 8 years ago

shreyagarwal commented 8 years ago

If we are printing huuge number of verbose logs in production with Level set to info , then it should not take so much time. If level is not at par, then the logs should simply be discarded

samarth commented 8 years ago

The case where this occurred was when we send a massive json (but not a string) into the logger.

This is because the npmlog does a util.format before emitting the log message.

We have the option of returning from the function before it does any kind of processing but that requires change in the npmlog repo . We'll have to fork it soon .

SirR4T commented 8 years ago

Since this was fixed in our fork, #11 should fix this. Can you please verify?

shreyagarwal commented 8 years ago

Done. Removed log recording functionality in npmlog