From 8264cdd15c2822d4670f24979f9d8a9a072ea9a4 Mon Sep 17 00:00:00 2001 From: alexlamsl Date: Tue, 18 Apr 2017 14:22:55 +0800 Subject: [PATCH] tweak info message template --- lib/compress.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/compress.js b/lib/compress.js index ed60ee49..4b0b1272 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -792,8 +792,13 @@ merge(Compressor.prototype, { // Further optimize statement after substitution. stat.reset_opt_flags(compressor); - compressor.info("Collapsing " + (is_constant ? "constant" : "variable") + - " " + var_name + " [{file}:{line},{col}]", node.start); + compressor.info("Collapsing {type} {name} [{file}:{line},{col}]", { + type: is_constant ? "constant" : "variable", + name: var_name, + file: node.start.file, + line: node.start.line, + col: node.start.col + }); CHANGED = true; return value; }