Added Log.raw function to just log an object
This commit is contained in:
parent
3842f96be3
commit
9b370d398d
7
log.js
7
log.js
|
@ -20,6 +20,10 @@ function log(message) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function logRaw(obj) {
|
||||||
|
Console.log(obj);
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
info: function (message) {
|
info: function (message) {
|
||||||
if (message)
|
if (message)
|
||||||
|
@ -36,5 +40,8 @@ module.exports = {
|
||||||
//log the message, attach innerEx information if it was passed
|
//log the message, attach innerEx information if it was passed
|
||||||
log("[ERROR] " + message + (innerEx ? ". Inner exception details: " + (innerEx.message || innerEx) : ""));
|
log("[ERROR] " + message + (innerEx ? ". Inner exception details: " + (innerEx.message || innerEx) : ""));
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
raw: function (obj) {
|
||||||
|
if (obj) logRaw(obj);
|
||||||
}
|
}
|
||||||
};
|
};
|
Loading…
Reference in a new issue