diff --git a/lib/util.js b/lib/util.js index 591076fd..9a31b81f 100644 --- a/lib/util.js +++ b/lib/util.js @@ -93,13 +93,17 @@ Util = exports || {}; * @param pArg */ Util.log = function(pArg){ - var lRet = pArg, - lConsole = Scope.console; + var lArg = pArg, + lConsole = Scope.console, + lDate = '[' + Util.getDate() + '] '; + + if(!Util.isString(lArg)) + lArg = JSON.stringify(lArg); if(lConsole && pArg) - lConsole.log(pArg); + lConsole.log(lDate + lArg); - return lRet; + return pArg; }; /**