Discover and explore top open-source AI tools and projects—updated daily.
fullstack-buildTypeScript and JavaScript logging library
Top 24.9% on SourcePulse
A universal logger for TypeScript and JavaScript, tslog provides a powerful, flexible, and developer-friendly logging experience across diverse environments including Node.js, browsers, Deno, and Bun. It targets developers seeking enhanced debugging, structured logging for observability, and robust customization, offering benefits like pretty or JSON output, secret masking, and hierarchical sub-loggers.
How It Works
This library employs a highly customizable, pluggable architecture. It supports both human-readable "pretty" output and machine-parseable JSON formats, with configurable log levels and extensive options for object/error interpolation and secret masking. A key design choice is its universal runtime support and deep TypeScript integration, including native source map support for accurate stack traces. Its lifecycle model allows deep overwrites of logging steps, from masking to formatting and transport, enabling integration with external services.
Quick Start & Requirements
npm install tslog"type": "module" in package.json and running with --enable-source-maps.tsconfig.json should include "inlineSourceMap": true and target: "es2020" for accurate stack traces.Highlighted Details
AsyncLocalStorage-based request ID tracking in Node.js.hideLogPositionForProduction to tune performance for production environments.Maintenance & Community
The project appears to be maintained by a single developer, with a call for sponsors to support ongoing work. No specific community channels (e.g., Discord, Slack) or details on a broader contributor base are provided in the README.
Licensing & Compatibility
The README does not explicitly state the software license. This omission requires further investigation for adoption decisions, particularly concerning commercial use or linking with closed-source projects.
Limitations & Caveats
Default settings prioritize developer experience and may require tuning for optimal production performance. The lack of an explicitly stated license is a significant adoption blocker. Node.js ESM usage necessitates specific configuration and runtime flags for full source map functionality.
1 day ago
Inactive
vercel
openclaw