All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Added
browserConsoleconfiguration for browser output control:localhostlogs only on local browser hosts (default)alwaysopts into browser console output on any hostneverdisables default browser console output
- Suppressed default browser console output on non-localhost production hosts unless explicitly overridden.
- Centralized default output handling across logger and internal diagnostics.
- Enforced configured AI rate limits before external provider calls.
- Upgraded runtime and development dependencies to current CVE-free versions.
- Migrated Biome, TypeScript, and Vite configuration for the upgraded toolchain.
- Resolved dependency audit findings in the lockfile;
pnpm auditnow reports zero known vulnerabilities.
- Enhanced Table Safety: Robust serialization for
logger.table()method- Safe handling of BigInt values (converted to string with 'n' suffix)
- Circular reference detection and protection
- Special object type handling (Date, Error, Map, Set, etc.)
- Graceful fallback for serialization errors
- Prevents crashes when logging complex data structures
-
Table Logging: New
logger.table()method for displaying tabular data- Supports custom headers and border options
- Colored headers with proper column alignment
- Works with both text and JSON output formats
- Example:
logger.table(data, { headers: ['Name', 'Age'], border: false })
- Dual Module Support: Fixed CommonJS and ESM compatibility issues
- Resolved chalk import handling for both module systems
- Fixed method binding issues in exported logger instance
- Ensured proper
thiscontext preservation for logger methods
- Multiple Import Patterns: Support for various CommonJS import styles
const { logger } = require('@calphonse/logger')(recommended)const { logger, createLogger, LogLevel } = require('@calphonse/logger')
- Enhanced Developer Experience: Better TypeScript support and error handling
- Minor documentation and build improvements
- Resolved npm publication issues with initial release
-
Initial Release - A beautiful, feature-rich logging library for Node.js applications
-
Core Logging Features:
- Multiple log levels: ERROR, WARN, INFO, DEBUG, TRACE
- Colored terminal output using chalk
- Timestamp support with customizable format
- Source file information tracking
- Structured data logging with JSON support
- Custom prefixes for log organization
-
Logger Configuration:
- Flexible configuration system with sensible defaults
- Environment-aware settings
- Custom output streams support
- Color and formatting controls
- Log level filtering