diff options
author | Samy Pesse <samypesse@gmail.com> | 2016-05-01 15:55:27 +0200 |
---|---|---|
committer | Samy Pesse <samypesse@gmail.com> | 2016-05-01 15:55:27 +0200 |
commit | 2c29fb241f36c490d8329e3578afb01eb31a14ae (patch) | |
tree | fa381e8280dfedd5357f1f216b5fcca156a0c976 /lib/utils/timing.js | |
parent | 77dc11bcc2cb8976552ec1f2ef17a4ecdafef9ad (diff) | |
download | gitbook-2c29fb241f36c490d8329e3578afb01eb31a14ae.zip gitbook-2c29fb241f36c490d8329e3578afb01eb31a14ae.tar.gz gitbook-2c29fb241f36c490d8329e3578afb01eb31a14ae.tar.bz2 |
Always log timing infos
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 = { |