import { Logger , getLogger , LogLevelDesc } from 'loglevel' ; /**
 * LoggerFactory with static methods for getting log instances
 */ export class LoggerFactory { returns static getRootLogger ( ) { return this . getLogger ( 'root' ) ; } param name returns static getLogger ( name ) { if ( ! name ) { return this . getRootLogger ( ) ; } const loggerLevel = ( localStorage . getItem ( `loglevel:${ name }` ) as LogLevelDesc ) || 'info' ; const namedLog = getLogger ( name ) ; namedLog . setLevel ( loggerLevel ) ; return namedLog ; } } const log = LoggerFactory . getRootLogger ( ) ; /**
 * Export the root log by default
 */ export default log ;