import { LOG_LEVELS } from "src/shared/constants" ; import { curryFunctionMembers } from "src/shared/util" ; const LOGGER = __ELECTRON_EXPOSURE__ . Logger ; export const getWebLogger = ( ... args ) : typeof LOGGER => { const logger = { ... curryFunctionMembers ( LOGGER , ... args ) } ; for ( const level of LOG_LEVELS ) { logger [ level ] = ( ( original ) => { return function ( this , ... loggerArgs ) { return original . apply ( this , loggerArgs ) ; } ; } ) ( logger [ level ] ) ; } return logger ; } ;