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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user