From e3865ef4f1a67de0e69c19bd5e77ce1cc70a2810 Mon Sep 17 00:00:00 2001 From: OldHawk Date: Sun, 24 Dec 2017 14:31:44 +0800 Subject: [PATCH] opt(debug): optimization debug console print methods --- config/lib/debug.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/lib/debug.js b/config/lib/debug.js index 4c7639f1..1a1b6874 100644 --- a/config/lib/debug.js +++ b/config/lib/debug.js @@ -14,7 +14,9 @@ var appConfig = config.meanTorrentConfig.app; */ module.exports.info = function (obj, section) { if (appConfig.showDebugLog) { - console.log(section ? ' - ' + section : ''); + if (section) { + console.log(section); + } console.log(obj); } };