export default class Logging { _log : boolean = false ; constructor ( showLogs = true ) { this . _log = showLogs ; } public log ( ... args ) { this . show ( 'log' , ... args ) ; } public info ( ... args ) { this . show ( 'info' , ... args ) ; } public warn ( ... args ) { this . show ( 'warn' , ... args ) ; } public error ( ... args ) { this . show ( 'error' , ... args ) ; } private show ( type , ... args ) { if ( this . _log ) { console [ type ] ( `[${ new Date ( ) . toLocaleString ( ) }]` , ... args ) ; } } }