Files
smartdebug/ts/index.ts

23 lines
394 B
TypeScript
Raw Normal View History

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