From 0dfb2416d112759af6543c2b27336005feba6a9d Mon Sep 17 00:00:00 2001 From: Bass Jobsen Date: Mon, 15 Dec 2014 12:02:22 +0100 Subject: [PATCH] Better output for the warning when file size exceeds As far as i understand does the logger.warn() function not accept such string neither has Less a built-in string format function? --- lib/less/functions/data-uri.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/less/functions/data-uri.js b/lib/less/functions/data-uri.js index dd2304b6b..abf48622e 100644 --- a/lib/less/functions/data-uri.js +++ b/lib/less/functions/data-uri.js @@ -62,7 +62,7 @@ module.exports = function(environment) { if (fileSizeInKB >= DATA_URI_MAX_KB) { if (this.context.ieCompat !== false) { - logger.warn("Skipped data-uri embedding of %s because its size (%dKB) exceeds IE8-safe %dKB!", filePath, fileSizeInKB, DATA_URI_MAX_KB); + logger.warn("Skipped data-uri embedding of " + filePath + " because its size (" + fileSizeInKB.toFixed(1) + "KB) exceeds IE8-safe " + DATA_URI_MAX_KB.toFixed(1) + "KB!"); return fallback(this, filePathNode || mimetypeNode); }