UNPKG

cross-log

Version:

A universal logging package that works in both browser and Node.js environments with environment variable configuration

35 lines 1.98 kB
/** * Universal Logger - Main entry point * * Automatically detects environment and provides appropriate logger implementation */ import { LoggerConfig, ILogger } from './core/types'; /** * Create a logger instance with automatic environment detection */ export declare function createLogger(config?: Partial<LoggerConfig>): ILogger; /** * Default logger instance */ declare const defaultLogger: ILogger; export declare const debug: (message: string, category?: string, ...args: unknown[]) => void; export declare const info: (message: string, category?: string, ...args: unknown[]) => void; export declare const warn: (message: string, category?: string, ...args: unknown[]) => void; export declare const error: (message: string | Error, category?: string, ...args: unknown[]) => void; export declare const setLevel: (level: import("./core/types").LogLevel) => void; export declare const configure: (config: Partial<LoggerConfig>) => void; export declare const enableCategory: (category: string, minLevel?: import("./core/types").LogLevel) => void; export declare const disableCategory: (category: string) => void; export declare const enableAll: () => void; export declare const disableAll: () => void; export declare const getConfig: () => LoggerConfig; export declare const isEnabled: () => boolean; export declare const Level: typeof import("./core/types").LogLevel; export { BrowserLogger } from './loggers/browser'; export { NodeLogger } from './loggers/node'; export { BaseLogger } from './loggers/base'; export { LogLevel, LoggerConfig, CategoryConfig, ColorConfig, BrowserColorConfig, AnsiColorConfig, StorageConfig, BrowserControlsConfig, Environment, ILogger, LogEntry, EnvConfig } from './core/types'; export { detectEnvironment, parseLogLevel, parseEnvBoolean, parseEnvInt, formatTimestamp, isLoggingEnabled, formatMessage } from './core/utils'; export { ConfigManager } from './core/config'; export default defaultLogger; //# sourceMappingURL=index.d.ts.map