diff options
Diffstat (limited to 'lib/utils/timing.js')
-rw-r--r-- | lib/utils/timing.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/utils/timing.js b/lib/utils/timing.js index 21a4b91..9903af2 100644 --- a/lib/utils/timing.js +++ b/lib/utils/timing.js @@ -64,6 +64,10 @@ function dump(logger) { var measured = 0; var totalDuration = Date.now() - startDate; + // Enable debug logging + var logLevel = logger.getLevel(); + logger.setLevel('debug'); + Immutable.Map(timers) .valueSeq() .sortBy(function(timer) { @@ -81,6 +85,9 @@ function dump(logger) { logger.debug.ln(time(totalDuration - measured) + ' spent in non-mesured sections'); + + // Rollback to previous level + logger.setLevel(logLevel); } module.exports = { |