humanbehavior-js
Version:
SDK for HumanBehavior session and event recording
35 lines • 1.13 kB
TypeScript
export declare enum LogLevel {
NONE = 0,
ERROR = 1,
WARN = 2,
INFO = 3,
DEBUG = 4
}
export interface LoggerConfig {
level: LogLevel;
enableConsole: boolean;
enableStorage: boolean;
}
declare class Logger {
private config;
private isBrowser;
constructor(config?: Partial<LoggerConfig>);
setConfig(config: Partial<LoggerConfig>): void;
private shouldLog;
private formatMessage;
error(message: string, ...args: any[]): void;
warn(message: string, ...args: any[]): void;
info(message: string, ...args: any[]): void;
debug(message: string, ...args: any[]): void;
private logToStorage;
getLogs(): any[];
clearLogs(): void;
}
export declare const logger: Logger;
export declare const isSDKLogging: () => boolean;
export declare const logError: (message: string, ...args: any[]) => void;
export declare const logWarn: (message: string, ...args: any[]) => void;
export declare const logInfo: (message: string, ...args: any[]) => void;
export declare const logDebug: (message: string, ...args: any[]) => void;
export {};
//# sourceMappingURL=logger.d.ts.map