UNPKG

code-craft-studio

Version:

A comprehensive QR code and barcode scanning/generation library for React. Works with or without Capacitor. Supports 22+ QR data types and 14+ barcode formats (EAN, UPC, Code 128, etc.), with customizable designs, analytics, and React components. Provider

30 lines (29 loc) 916 B
/** * Logger utility for Code Craft Studio * Provides consistent logging with configurable levels */ export type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'none'; export interface LoggerConfig { level: LogLevel; prefix?: string; enabled?: boolean; } declare class Logger { private config; private readonly levels; configure(config: Partial<LoggerConfig>): void; private shouldLog; private formatMessage; debug(message: string, ...args: any[]): void; info(message: string, ...args: any[]): void; warn(message: string, ...args: any[]): void; error(message: string, error?: Error | unknown, ...args: any[]): void; /** * Sets the log level based on environment * In production, defaults to 'error' only * In development, defaults to 'warn' */ setEnvironmentLevel(): void; } export declare const logger: Logger; export default logger;