2015-11-15 19:35:13 +00:00
|
|
|
/// <reference path="typings/tsd.d.ts" />
|
|
|
|
var beautylog = require("beautylog");
|
|
|
|
var colors = require("colors");
|
|
|
|
var debugActive = false;
|
2015-11-16 00:40:23 +00:00
|
|
|
var smartdebug = {
|
2015-11-15 19:35:13 +00:00
|
|
|
log: function (message) {
|
|
|
|
if (debugActive) {
|
|
|
|
beautylog.log("Debug:".zebra + ' ' + message);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
activate: function (debugArg) {
|
|
|
|
debugActive = debugArg;
|
|
|
|
}
|
|
|
|
};
|
2015-11-16 00:40:23 +00:00
|
|
|
module.exports = smartdebug;
|