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:
@@ -24,7 +24,7 @@ global.logger = new Logger
|
||||
switch window.location.hostname
|
||||
when 'localhost'
|
||||
global.env = 'development'
|
||||
logger.level = Logger.DEBUG
|
||||
logger.level = Logger.INFO
|
||||
when 'new.crafting-guide.com'
|
||||
global.env = 'staging'
|
||||
logger.level = Logger.VERBOSE
|
||||
@@ -41,5 +41,5 @@ feedbackController.render()
|
||||
|
||||
global.router.loadDefaultModPack()
|
||||
|
||||
logger.info "CraftingGuide is ready"
|
||||
logger.info -> "CraftingGuide is ready"
|
||||
Backbone.history.start pushState:true
|
||||
|
||||
Reference in New Issue
Block a user