UNPKG

react-native-healthkit-bridge

Version:

A comprehensive React Native bridge for Apple HealthKit with TypeScript support, advanced authorization, and flexible data queries

37 lines (36 loc) 1.56 kB
export type LogLevel = 'debug' | 'info' | 'warn' | 'error'; export interface LogEntry { level: LogLevel; message: string; context?: any; timestamp: string; operation?: string; } export declare class HealthKitLogger { private static instance; private logs; private maxLogs; private constructor(); static getInstance(): HealthKitLogger; debug(message: string, context?: any, operation?: string): void; info(message: string, context?: any, operation?: string): void; warn(message: string, context?: any, operation?: string): void; error(message: string, context?: any, operation?: string): void; private log; getLogs(level?: LogLevel): LogEntry[]; getLogsByOperation(operation: string): LogEntry[]; getRecentLogs(count?: number): LogEntry[]; clearLogs(): void; getLogStats(): { total: number; byLevel: Record<LogLevel, number>; }; logOperation(operation: string, message: string, context?: any): void; logError(operation: string, error: any, context?: any): void; logPerformance(operation: string, duration: number, context?: any): void; } export declare const logger: HealthKitLogger; export declare function logDebug(message: string, context?: any, operation?: string): void; export declare function logInfo(message: string, context?: any, operation?: string): void; export declare function logWarn(message: string, context?: any, operation?: string): void; export declare function logError(message: string, context?: any, operation?: string): void;