Improve logging performance by using functions

Improve logging performance by using functions to delay when complex
strings are created until after the current logging level has been
checked to ensure that log statement is actually going to be printed.
There are many places where very complex objects are printed at lower
logging levels which this avoids.
This commit is contained in:
Andrew Miner
2015-02-09 21:15:10 -08:00
parent cf6d6fdbed
commit 0a52d16eb1
8 changed files with 22 additions and 22 deletions
+1 -1
View File
@@ -169,7 +169,7 @@ module.exports = class Mod extends BaseModel
@_activeModVersion = modVersion
@trigger Event.change + ':activeModVersion', this, @_activeModVersion
logger.verbose "#{@slug} switched to version #{@_activeVersion}"
logger.verbose => "#{@slug} switched to version #{@_activeVersion}"
if @_activeModVersion?
@listenTo @_activeModVersion, 'all', -> @trigger.apply this, arguments