From d61ba34b2afe73549629ec75f40fb2508b600c06 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Mon, 20 Mar 2017 22:43:55 +0800 Subject: [PATCH] update ariang log service --- src/scripts/services/ariaNgLogService.js | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/scripts/services/ariaNgLogService.js b/src/scripts/services/ariaNgLogService.js index 0186c3b..427cdfa 100644 --- a/src/scripts/services/ariaNgLogService.js +++ b/src/scripts/services/ariaNgLogService.js @@ -5,17 +5,33 @@ return { debug: function (msg, obj) { if (ariaNgSettingService.isEnableDebugMode()) { - $log.debug('[AriaNg Debug]' + msg, obj); + if (obj) { + $log.debug('[AriaNg Debug]' + msg, obj); + } else { + $log.debug('[AriaNg Debug]' + msg); + } } }, info: function (msg, obj) { - $log.info('[AriaNg Info]' + msg, obj); + if (obj) { + $log.info('[AriaNg Info]' + msg, obj); + } else { + $log.info('[AriaNg Info]' + msg); + } }, warn: function (msg, obj) { - $log.warn('[AriaNg Warn]' + msg, obj); + if (obj) { + $log.warn('[AriaNg Warn]' + msg, obj); + } else { + $log.warn('[AriaNg Warn]' + msg); + } }, error: function (msg, obj) { - $log.error('[AriaNg Error]' + msg, obj); + if (obj) { + $log.error('[AriaNg Error]' + msg, obj); + } else { + $log.error('[AriaNg Error]' + msg); + } } }; }]);