2015-11-15 19:35:13 +00:00
|
|
|
/// <reference path="typings/tsd.d.ts" />
|
2015-11-16 00:50:28 +00:00
|
|
|
var beautylog = require("beautylog")("os");
|
2015-11-15 19:35:13 +00:00
|
|
|
var colors = require("colors");
|
|
|
|
|
|
|
|
var debugActive:boolean = false;
|
2015-11-16 00:50:28 +00:00
|
|
|
var smartDebug = {
|
2015-11-15 19:35:13 +00:00
|
|
|
log: function(message:string){
|
|
|
|
if (debugActive) {
|
2015-11-16 00:50:28 +00:00
|
|
|
beautylog.log("###DEBUG:###".rainbow + ' ' + message);
|
2015-11-15 19:35:13 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
activate: function(debugArg:boolean){
|
|
|
|
debugActive = debugArg;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2015-11-16 00:50:28 +00:00
|
|
|
module.exports = smartDebug;
|