import { ConsoleLogger } from './logger' ; const doWarn = ( ... args ) => { console . warn ( ... args ) ; alert ( '[WARN] ' + args . map ( a => JSON . stringify ( a ) ) . join ( ' ' ) ) ; } ; const doError = ( ... args ) => { console . error ( ... args ) ; alert ( '[ERROR] ' + args . map ( a => JSON . stringify ( a ) ) . join ( ' ' ) ) ; } ; export class AlertsLogger extends ConsoleLogger { constructor ( name , enabled = true ) { super ( name , enabled , { log : console . log , warn : doWarn , error : doError , } ) ; } }