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.rainbow('π Colorful logging');
logger.table(data);
logger.progress(0.75);
Insanely Fast
Faster than console.log with zero overhead. Handle millions of logs without breaking a sweat.
Intelligent Context
Automatically capture and organize metadata. Track requests, trace errors, and understand your app's behavior.
100% Compatible
Drop-in replacement for Winston, Bunyan, or Pino. Switch in seconds, not hours.
Ship Anywhere
One logger, infinite destinations. Console, files, HTTP, S3, databases - we've got you covered.
Production Ready
Battle-tested in production with built-in error handling, retries, and graceful degradation.
Works Everywhere
Node.js, browsers, workers, serverless - if it runs JavaScript, MagicLogger runs on it.
Built-in Analytics
Track performance, monitor errors, and visualize patterns without external tools.
Powerful Search
Find any log instantly with our built-in search and filtering capabilities.
Architecture that scales
Simple by default, powerful when you need it
Logger Core
Lightweight orchestration layer that manages everything
// 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);
}
});
}
}
Performance that matters
Benchmarked against the best, optimized for real-world use
Synchronous Performance
Direct logging throughput - no buffering
Why is MagicLogger so fast?
Zero heap allocations, monomorphic functions, and a ring buffer architecture designed for V8's JIT compiler. We obsess over every nanosecond.
Zero Allocations
Ring buffer architecture with object pooling minimizes garbage collection
Lock-Free Design
Non-blocking operations ensure your app never waits for logging
Smart Batching
Intelligent batching reduces I/O operations by up to 90%
JIT Optimized
Monomorphic functions and predictable object shapes for maximum V8 performance
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();
// It just worksβ’
logger.info('Server started successfully');
logger.warn('Memory usage is high', { usage: '85%' });
logger.error('Failed to connect', new Error('ECONNREFUSED'));
// Pretty printing built-in
logger.success('β
All tests passed!');
logger.rainbow('π Make logging fun again!');
// Structured data? We got you
logger.table([
{ name: 'Alice', role: 'Developer', status: 'Active' },
{ name: 'Bob', role: 'Designer', status: 'Away' }
]);
π‘ Pro Tips
Always pass metadata as the second parameter for better searchability and filtering.
Use hierarchical tags like 'api', 'api.auth', 'api.auth.login' for powerful filtering.
Create scoped loggers for requests, jobs, or features to automatically include context.
Enable async mode for high-volume logging. Your app will thank you.
Use structured logging to make every log searchable and actionable.
Built-in performance tracking means you're always ready to optimize.
Works with everything you use
Drop-in integrations for your favorite frameworks and tools
Express
Automatic request logging with correlation IDs
app.use(magicLogger.express());
Next.js
Full-stack logging for pages and API routes
export default withLogger(handler);
React
Error boundaries and performance tracking
<LogProvider logger={logger}>
AWS Lambda
Structured logs for CloudWatch
exports.handler = withLogger(handler);
Kubernetes
JSON logs with pod metadata
logger.k8s({ pod, namespace });
Docker
Container-aware logging
logger.docker({ containerId });
Loved by developers worldwide
See what teams are saying about MagicLogger
"MagicLogger transformed how we handle debugging in production. What used to take hours now takes minutes."
"The performance is incredible. We're handling millions of logs per day without breaking a sweat."
"Finally, a logging library that's both powerful and doesn't bloat our bundle size. Perfect for our React apps."
Ready to transform your debugging experience?
Join thousands of developers who've made their logs beautiful, meaningful, and actually useful.