[Pkg-javascript-commits] [less.js] 74/88: tweak the log levels. Fixes #1856

Jonas Smedegaard dr at jones.dk
Mon Oct 26 23:22:28 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag v1.7.0
in repository less.js.

commit 6f3f59cd573dd55bac01685d56b2ea891aa6236e
Author: Luke Page <luke.a.page at gmail.com>
Date:   Sun Feb 23 08:26:18 2014 +0000

    tweak the log levels. Fixes #1856
---
 lib/less/browser.js | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lib/less/browser.js b/lib/less/browser.js
index ffcf82f..63fdde0 100644
--- a/lib/less/browser.js
+++ b/lib/less/browser.js
@@ -14,6 +14,7 @@ less.env = less.env || (location.hostname == '127.0.0.1' ||
                                                          : 'production');
 
 var logLevel = {
+    debug: 3,
     info: 2,
     errors: 1,
     none: 0
@@ -24,7 +25,7 @@ var logLevel = {
 // 1 - Errors
 // 0 - None
 // Defaults to 2
-less.logLevel = typeof(less.logLevel) != 'undefined' ? less.logLevel : logLevel.info;
+less.logLevel = typeof(less.logLevel) != 'undefined' ? less.logLevel : logLevel.debug;
 
 // Load styles asynchronously (default: false)
 //
@@ -422,7 +423,7 @@ function doXHR(url, type, callback, errback) {
     if (typeof(xhr.overrideMimeType) === 'function') {
         xhr.overrideMimeType('text/css');
     }
-    log("XHR: Getting '" + url + "'", logLevel.info);
+    log("XHR: Getting '" + url + "'", logLevel.debug);
     xhr.open('GET', url, async);
     xhr.setRequestHeader('Accept', type || 'text/x-less, text/css; q=0.9, */*; q=0.5');
     xhr.send(null);
@@ -644,12 +645,12 @@ less.refresh = function (reload, modifyVars) {
         if (env.local) {
             log("loading " + sheet.href + " from cache.", logLevel.info);
         } else {
-            log("parsed " + sheet.href + " successfully.", logLevel.info);
+            log("parsed " + sheet.href + " successfully.", logLevel.debug);
             createCSS(root.toCSS(less), sheet, env.lastModified);
         }
         log("css for " + sheet.href + " generated in " + (new Date() - endTime) + 'ms', logLevel.info);
         if (env.remaining === 0) {
-            log("css generated in " + (new Date() - startTime) + 'ms', logLevel.info);
+            log("less has finished. css generated in " + (new Date() - startTime) + 'ms', logLevel.info);
         }
         endTime = new Date();
     }, reload, modifyVars);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/less.js.git



More information about the Pkg-javascript-commits mailing list