export const enum LogLevel { Verbose = 5 , Debug = 4 , Info = 3 , Warning = 2 , Error = 1 , Off = 0 } export class Logger { constructor ( public level = LogLevel . Info ) { } public debug ( ... args ) { if ( this . level >= LogLevel . Debug ) { console . log ( ... args ) ; } } public verbose ( ... args ) { if ( this . level >= LogLevel . Verbose ) { console . log ( ... args ) ; } } public info ( ... args ) { if ( this . level >= LogLevel . Info ) { console . log ( ... args ) ; } } public warning ( ... args ) { if ( this . level >= LogLevel . Warning ) { console . log ( ... args ) ; } } public error ( ... args ) { if ( this . level >= LogLevel . Error ) { console . log ( ... args ) ; } } } export const logger = new Logger ( parseInt ( process . env . LOG_LEVEL || '3' , 10 ) ) ;