export enum LogLevel { None = 0 , Normal = 1 , Debug = 2 } class Logging { logThreshold = LogLevel . Normal ; log ( error , level ? ) { level = level || LogLevel . Normal ; if ( this . logThreshold === LogLevel . None || this . logThreshold < level ) { return ; } try { console . log ( error ) ; } catch { console . log ( JSON . stringify ( error ) ) ; } } } export var logging = new Logging ( ) ; export default logging ;