smartdebug/ts/index.ts

23 lines
394 B
TypeScript
Raw Normal View History

2017-09-18 13:19:18 +00:00
import * as plugins from './smartdebug.plugins'
2015-11-15 19:35:13 +00:00
2017-09-18 13:19:18 +00:00
export class SmartDebug {
private debugEnabled: boolean = false
/**
* enables debugging output
*/
2017-09-19 15:58:59 +00:00
enableDebugging () {
2017-09-18 13:19:18 +00:00
this.debugEnabled = true
}
/**
* logs a message based on the contraints of the SmartDebug instance
*/
log (logObject: any) {
2017-09-19 15:58:59 +00:00
if (this.debugEnabled) {
2017-09-18 13:19:18 +00:00
console.log(logObject)
2015-11-15 19:35:13 +00:00
}
2017-09-18 13:19:18 +00:00
}
2015-11-15 19:35:13 +00:00
2017-09-18 13:19:18 +00:00
}