Skip to main content

Home of

MagicLogger

MAGIC Schema

MagicLogger Terminal Demo

Visual Dashboard for Beautiful Logs End-to-End

We built MagicLogger because we believe logs should be as visually informative and beautiful in production as they are during development. The MAGIC Schema preserves your styled logs across any transport or platform. Focused on visual clarity and developer experience, not just raw performance.

Terminal
$npm install magiclogger
0KB
Core (gzip)
0K+ ops/s
Plain Text
0K+ ops/s
Styled Output
MagicLogger Terminal Demo

Why developers love MagicLogger

Everything you need to debug faster, understand deeper, and ship with confidence

Beautiful by Default

Turn your console into a work of art. Automatic colors, emojis, tables, and formatting that makes debugging a joy.

logger.info('๐ŸŒˆ <rainbow>'); logger.table(data); logger.progressBar(0.75);
256 ColorsSmart TablesProgress BarsEmoji Support

Async by Default

Non-blocking async logging for responsive applications. Optimized for visual clarity, not just speed. Sync mode available when needed.

250K+ ops/s plain120K+ ops/s styledMinimal dependenciesTree-shakeable

MAGIC Schema

Universal style preservation with our MAGIC schema. Maintain consistent formatting across all transports.

Style Preservation
Cross-Transport
Universal Format
Color Consistency

Ship Anywhere

One logger, infinite destinations. From console to cloud, we support all major transports.

ConsoleFileHTTP/SS3MongoDBPostgreSQLWebSocketOTLPStream

Production Ready

Built-in extensions for rate limiting, sampling, redaction, and queue management. Focus on reliability and maintainability.

Rate Limiter
Sampler
Redactor
Queue Manager

Works Everywhere

Same API for Node.js, browsers, and all JavaScript environments. The only production logger with full browser support.

Node.js + Deno
Browser Console
React Native
Isomorphic Apps

OpenTelemetry Support

Native OpenTelemetry integration for distributed tracing and observability.

Trace Context
Span Integration
OTLP Export
W3C Standards

Flexible Architecture

Extensible design with custom transports, formatters, and processors.

Custom Transports
Custom Formatters
Middleware Support
Plugin System

TypeScript First

100% TypeScript with full type safety and enforced 70%+ unit test coverage in CI/CD.

Full Type Safety
70%+ Test Coverage
Strict CI/CD Guards
Type Definitions

Architectural Diagram

Worker thread architecture โ€ข Smart batching โ€ข Minimal dependencies โ€ข Tree-shakeable

Your ApplicationLogger CoreTransport LayerDestinations

Logger Core

Lightweight routing layer that directs logs to transports efficiently

47KB gzipped core
Minimal dependencies
Direct transport routing
High performance
MAGIC schema standard
Example
// Logger core - lightweight orchestration
class Logger {
  constructor(options?: LoggerOptions) {
    this.id = options?.id || this.generateId();
    this.transports = options?.transports || [];
    this.context = options?.context || {};
    this.tags = options?.tags || [];
  }
  
  log(level: LogLevel, message: string, meta?: any): void {
    const entry = this.createEntry(level, message, meta);
    this.dispatch(entry);
  }
  
  private dispatch(entry: LogEntry): void {
    this.transports.forEach(transport => {
      if (transport.shouldLog?.(entry) ?? true) {
        transport.log(entry);
      }
    });
  }
}
Explore full architecture

Performance that matters

Benchmarked against the best, optimized for real-world use

โšก Performance: MagicLogger achieves 250K+ ops/sec plain text and 120K+ ops/sec with styled output. Every log includes full MAGIC schema, OpenTelemetry context, and style preservation - purposeful trade-offs for complete observability.

Styled Output Performance

Real-world performance with file I/O (20K iterations)

Winston (Styled)
446,027/s
Pino (Pretty)
274,431/s
MagicLogger (Sync)
269,587/s
MagicLogger (Async)
165,694/s
MagicLogger (Async + Styles)
116,404/s
Bunyan (Styled)
99,468/s

Sync vs Async: Choose Your Speed

Plain text logging? Use SyncLogger for 250K+ ops/sec - the fastest option when you don't need styling.

Styled output? AsyncLogger delivers 120K+ ops/sec with styles - 50% faster than sync mode for styled logs. Why? Async mode uses pre-compiled style caching and non-blocking I/O, reducing style processing overhead from from over 40% to just 11.8%. Learn about our performance architecture โ†’

Non-Blocking

True async architecture with 0.004ms P50 blocking keeps your event loop responsive

Pre-Compiled Styles

Styles are compiled at logger creation for minimal runtime overhead

Smart Batching

Automatic batching for network transports, immediate dispatch for files

Real code, real examples

From quick prototypes to production systems - see how MagicLogger scales with you

๐ŸŽฏBasic Usage

Get started in seconds. No config needed.

import { Logger } from 'magiclogger';

const logger = new Logger();

// Beautiful logs with angle bracket syntax
logger.info('<cyan.bold>Server started</> on port <yellow>3000</>');
logger.warn('<yellow>โš </> Memory usage <red.bold>high</>', { usage: '85%' });
logger.error('Connection failed', new Error('ECONNREFUSED'));

// The MAGIC Schema preserves your styles everywhere
logger.success('<green>โœ… All tests passed!</>');
logger.header('Application Metrics', ['cyan', 'bold']);

// Rich formatting with real data
logger.table([
{ endpoint: '/api/users', requests: 12847, avg_ms: 45, p99_ms: 142 },
{ endpoint: '/api/posts', requests: 8432, avg_ms: 23, p99_ms: 87 },
{ endpoint: '/api/auth', requests: 3251, avg_ms: 112, p99_ms: 428 }
]);

// Progress tracking
logger.progress(0.75, 'Processing: 75% complete');

Ready to transform your debugging experience?

Join thousands of developers who've made their logs beautiful, meaningful, and actually useful.

Quick Start
$npm install magiclogger
// Start logging in seconds
import Logger from 'magiclogger';
const logger = new Logger();
logger.info('โœจ Hello, MagicLogger!');