UNPKG

cross-log

Version:

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

39 lines 3.26 kB
/** * Universal Logger - Main entry point * * Automatically detects environment and provides appropriate logger implementation */ import { ILogger, PartialLoggerConfig } from './core/types'; /** * Create a logger instance with automatic environment detection */ export declare function createLogger(config?: PartialLoggerConfig): 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: PartialLoggerConfig) => 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: () => import("./core/types").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 { EdgeLogger } from './loggers/edge'; export { BaseLogger } from './loggers/base'; export { LogLevel, LoggerConfig, CategoryConfig, ColorConfig, BrowserColorConfig, AnsiColorConfig, StorageConfig, BrowserControlsConfig, Environment, ILogger, LogEntry, EnvConfig, DeepPartial, PartialLoggerConfig, LogLevelValue, isLogLevel, isLogLevelString, mergeConfig } from './core/types'; export { detectEnvironment, parseLogLevel, parseEnvBoolean, parseEnvInt, formatTimestamp, isLoggingEnabled, formatMessage } from './core/utils'; export { detectRuntimeType, RuntimeType, getEnvironmentVariable, isProductionEnvironment, type RuntimeTypeValue } from './core/environment'; export { ConfigManager } from './core/config'; export { plugins, createApiPlugin, createDatabasePlugin, createAnalyticsPlugin, createPerformancePlugin, createSecurityPlugin, PluginManager, Plugin, PluginConfig, PluginContext, LoggerWithPlugins, ApiPlugin, DatabasePlugin, AnalyticsPlugin, PerformancePlugin, SecurityPlugin, ApiPluginConfig, DatabasePluginConfig, AnalyticsPluginConfig, PerformancePluginConfig, SecurityPluginConfig, WebVitalsMetrics, SecuritySeverity, PluginRegistry, PluginName, PluginMethods, PluginConfigType, TypedPlugin, LoggerBuilder, PluginFactory, PluginFactories, LoggerWithPluginsConfig, EnabledPlugins, ConfiguredLogger, CustomPluginRegistry, FullPluginRegistry, FullPluginName, createLoggerBuilder, createLoggerWithPlugins, wrapLogger, hasPlugin, hasPlugins } from './plugins'; export { TypedLogger, PartialTypedLogger, TypedLoggerConfig, createTypedLogger, createPartialTypedLogger, isPluginAvailable, createLoggerWithSelectedPlugins, createAsyncTypedLogger } from './plugins/typed-wrapper'; export default defaultLogger; //# sourceMappingURL=index.d.ts.map