homebridge-gira-client
Version:
Homebridge Plugin für Gira Homeserver 4 mit automatischer Geräteerkennung über IoT REST API
41 lines • 1.74 kB
TypeScript
import { Logger } from 'homebridge';
export declare class ExtendedLogger {
private readonly homebridgeLogger;
private debugEnabled;
private logBuffer;
private readonly maxBufferSize;
constructor(homebridgeLogger: Logger, debugMode?: boolean);
info(message: string, ...args: any[]): void;
warn(message: string, ...args: any[]): void;
error(message: string, ...args: any[]): void;
debug(message: string, ...args: any[]): void;
success(message: string, ...args: any[]): void;
setDebugEnabled(enabled: boolean): void;
private addToBuffer;
getRecentLogs(count?: number): LogEntry[];
getLogsByLevel(level: LogLevel): LogEntry[];
clearBuffer(): void;
logDeviceOperation(deviceName: string, operation: string, success: boolean, details?: any): void;
logConnectionEvent(event: ConnectionEvent, details?: any): void;
logDiscoveryEvent(event: DiscoveryEvent, count?: number, details?: any): void;
logPerformanceMetric(operation: string, duration: number, success: boolean): void;
createTimer(operation: string): Timer;
}
export declare class Timer {
private readonly operation;
private readonly logger;
private startTime;
constructor(operation: string, logger: ExtendedLogger);
end(success?: boolean): number;
}
type LogLevel = 'info' | 'warn' | 'error' | 'debug' | 'success';
interface LogEntry {
timestamp: Date;
level: LogLevel;
message: string;
args: any[];
}
type ConnectionEvent = 'connecting' | 'connected' | 'disconnected' | 'reconnecting' | 'authenticated' | 'auth_failed';
type DiscoveryEvent = 'started' | 'completed' | 'device_found' | 'device_configured' | 'device_error';
export {};
//# sourceMappingURL=logger.d.ts.map