You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 4, 2024. It is now read-only.
I set the log level to "INFO" on production systems .
My code had a lot of verbose statements spread across it and in some cases , there was a massive json placed inside the logger. This led to a severe spike in latency on the average response times.
There already is an option of not writing to the stdout if the statement log level is lower than the general setting but we still do a lot of unnecessary processing in the log.log function (the culprit in my case was util.format)
Can we had the log level check in the log.log function itself ? Or is there some reason that you've added this in the emitLog function ?
Thanks .
The text was updated successfully, but these errors were encountered:
DivineGod
added a commit
to DivineGod/npmlog
that referenced
this issue
Jun 7, 2016
As reported in npm#36 the `log.log`
function will do processing of log messages even if the `log.level`
is higher than the message level.
This change will break systems expecting the event emitter to emit
log messages for every call to `log.log` as well as having `log.record`
only contain a list of messages that have the appropriate level
As reported in npm#36 the `log.log`
function will do processing of log messages even if the `log.level`
is higher than the message level.
This change will break systems expecting the event emitter to emit
log messages for every call to `log.log` as well as having `log.record`
only contain a list of messages that have the appropriate level
As I said over in #39, we need that where it is because we need log.record to have all log levels so that npm-debug.log files produced on crash can contain useful information. As things are structured today, I don't see a way to save you that computation. =/
I set the log level to "INFO" on production systems .
My code had a lot of verbose statements spread across it and in some cases , there was a massive json placed inside the logger. This led to a severe spike in latency on the average response times.
There already is an option of not writing to the stdout if the statement log level is lower than the general setting but we still do a lot of unnecessary processing in the log.log function (the culprit in my case was util.format)
Can we had the log level check in the log.log function itself ? Or is there some reason that you've added this in the emitLog function ?
Thanks .
The text was updated successfully, but these errors were encountered: