Return to Matrix
tools2025

MagicLogger — Colorful JavaScript / TypeScript Logger

A powerful, zero-config logging library for Node.js and browsers with rich styling, transport options, and a universal schema for logging styles compatible with OpenTelemetry.

MagicLogger — Colorful JavaScript / TypeScript Logger primary visual

![MagicLogger]

What's MagicLogger?

A powerful, zero-config logging library for Node.js and browsers with rich styling, transport options, and a universal schema for logging styles compatible with OpenTelemetry.

Simplify your logging with a single library that works everywhere.

Key Features

  • 🎨 Rich Styling — Colors, bold, italic, underline in terminal and browser console
  • 📊 Visual Elements — Progress bars and tables directly in your console
  • 📝 Multiple Transports — Console, file, browser storage, and remote HTTP endpoints
  • 🔌 Drop-in Compatibility — Replace console, Winston, Bunyan, and Pino seamlessly
  • 🧠 Structured Logging — Support for both text and JSON formats
  • ⚡ Zero Config & Zero Dependencies — Works out of the box with sensible defaults
  • 🌐 Environment Aware — Automatically adapts to Node.js or browser
  • 🧵 Multiple Module Formats — ESM, CommonJS, and TypeScript declarations

Quick Start

1import { Logger } from 'magiclogger'; 2 3// Create a new logger with default settings 4const logger = new Logger(); 5 6// Log with different levels 7logger.info('Application starting up...'); 8logger.warn('Connection pool nearing capacity'); 9logger.error('Database connection failed'); 10logger.debug('User authentication details'); 11logger.success('Email sent successfully'); 12 13// Add visual elements 14logger.header('SYSTEM STATUS'); 15logger.progressBar(75); // 75% progress bar 16 17// Structured logging 18logger.info('User logged in', { userId: 123, ip: '192.168.1.1' });

Powerful Transports

MagicLogger sends your logs wherever you need them:

1const logger = new Logger({ 2 // Log to console with colors 3 console: { 4 enabled: true, 5 useColors: true 6 }, 7 8 // Save logs to files (Node.js) 9 file: { 10 enabled: true, 11 directory: './logs' 12 }, 13 14 // Store logs in browser localStorage 15 browserStorage: { 16 enabled: true, 17 maxEntries: 1000 18 }, 19 20 // Send critical logs to your server 21 remote: { 22 enabled: true, 23 endpoint: 'https://logs.example.com/api/logs', 24 levels: ['error', 'warn'] 25 } 26});

Replace Existing Loggers

Enhance your existing logging code without refactoring:

1// Enhance the standard console 2import { enhanceConsole } from 'magiclogger'; 3enhanceConsole(); 4 5// Now standard console has new powers 6console.header('APPLICATION STATUS'); 7console.success('All systems operational'); 8 9// Create Winston/Bunyan/Pino compatible loggers 10import { createWinstonCompatible } from 'magiclogger'; 11const logger = createWinstonCompatible({ verbose: true });

Coming Soon!

MagicLogger is currently in development and will be available soon. Stay tuned for its release!

Built with ❤️ by Manic Agency - We do experimental design & development

Keywords & Concepts

javascripttypescriptnodejsloggingdevelopersfeatured