import { LogLevel } from './log-level.enum' ; export abstract class LoggerService { logLevel : LogLevel ; constructor ( logLevel ) { this . logLevel = logLevel ; } debug ( msg ) { this . log ( LogLevel . DEBUG , msg ) ; } info ( msg ) { this . log ( LogLevel . INFO , msg ) ; } warn ( msg ) { this . log ( LogLevel . WARN , msg ) ; } error ( msg ) { this . log ( LogLevel . ERROR , msg ) ; } abstract log ( logLevel , msg ) ; protected isProperLogLevel ( logLevel ) { if ( this . logLevel === LogLevel . DEBUG ) return true ; return logLevel >= this . logLevel ; } }