Winston Logger
github.com
1
Leaving SiteNav
External Link Disclaimer
You are about to visit github.com. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
Winston is a versatile and multi-transport logging library for Node.js designed to be a logger for just about everything, with over 24,500 GitHub stars, 1,800 forks, and millions of weekly downloads on npm. The library separates log message generation from log destination handling through a transport-based architecture, where each transport represents a distinct output target such as the console, files with rotation, HTTP endpoints, MongoDB, Redis, Elasticsearch, Amazon CloudWatch Logs, Google Cloud Logging, loggly, Datadog, Papertrail, and syslog. Multiple transports can be attached to a single logger instance, allowing the same log message to be simultaneously written to the console for development debugging, a rotated file for audit trails, and a cloud log aggregation service for production analysis. The default log levels follow RFC 5424 severity ordering with error at priority 0, warn at 1, info at 2, http at 3, verbose at 4, debug at 5, and silly at 6, with full support for custom level hierarchies. The formatting system provides built-in formats including JSON with configurable spacing and replacers, colorized output with chalk, timestamp injection, Logstash-compatible formatting, printf-style templates, pretty-printing with configurable depth, and uncolorize for stripping ANSI codes. Formats are composable through chaining, enabling complex preprocessing pipelines. Child loggers with bound metadata enable request-scoped contextual logging across microservices. The library includes uncaughtException and unhandledRejection handlers that capture and log fatal errors before process termination. The profiling API measures execution duration between start and stop calls. Version 3.x supports Node.js 22, 24, and 26, with an extensive test matrix across operating systems and Node.js versions. MIT licensed. Copyright 2010-2026 Charlie Robbins and contributors.
Tags & Categories
Categories
Tags
Statistics
1
Views
0
Clicks
0
Like
0
Dislike