A zero-dependency styled text logger for Node.js and browsers with colorized output, emoji icons, ISO timestamps, and six log levels (trace, debug, info, warn, error, fatal). Current stable version is 1.3.1, released in 2022 with no recent updates. Ships TypeScript definitions. Differentiators include no external dependencies, simple API, and visually appealing console output for quick debugging. Ideal for small projects or when you need a lightweight logger without bloat.
npm install styled-text-loggerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic info logging, error logging with exception, and debug logging with metadata object.
Use logger.info() or other level-specific methods instead.
In browsers, color codes may not render correctly. Use a polyfill or stick to Node.js environment.
Always import { logger } from 'styled-text-logger' before using logger.Use the default logger instance exported as named export 'logger'.
Use uppercase strings like 'INFO', 'DEBUG', etc.
Explicitly set log level if you need trace or debug by default.
Use import { logger } from 'styled-text-logger' or enable ESM in your project.Change import logger from 'styled-text-logger' to import { logger } from 'styled-text-logger'.Run npm install styled-text-logger and ensure import path is correct.
Use setLogLevel('INFO') from the same import.Use static import syntax or ensure your environment supports ES modules.
No dependency data recorded yet.