import { NativeModules } from 'react-native'; const LoggerModule = NativeModules.Logger; export interface ILogger { debug(message: string): void; error(message: string): void; info(message: string): void; warn(message: string): void; sendLogs(): void; getAppVersion(): void; } export class Logger implements ILogger { private tag: string; constructor(tag: string) { this.tag = tag; } public debug(message: string): void { LoggerModule.debug(this.tag, message); } public error(message: string): void { LoggerModule.error(this.tag, message); } public info(message: string): void { LoggerModule.info(this.tag, message); } public warn(message: string): void { LoggerModule.warn(this.tag, message); } public sendLogs() { LoggerModule.sendLogs(); } public getAppVersion() { LoggerModule.getAppVersion(); } }