import { ILogger } from 'polar-shared/src/logger/ILogger' ; import { RendererAnalytics } from '../ga/RendererAnalytics' ; import { GALoggers } from './GALoggers' ; /**
 * Logs errors as custom events within GA.
 */ export class GALogger implements ILogger { public readonly name : string = 'ga-logger' ; public notice ( msg , ... args ) { } public warn ( msg , ... args ) { } public error ( msg , ... args ) { const error = GALoggers . getError ( args ) ; const event = GALoggers . toEvent ( error ) ; if ( event ) { RendererAnalytics . event ( event ) ; } } public info ( msg , ... args ) { } public verbose ( msg , ... args ) { } public debug ( msg , ... args ) { } public async sync ( ) { } }