Best Practices for Logging in Node.js

This page summarizes the projects mentioned and recommended in the original post on

Our great sponsors
  • InfluxDB - Build time-series-based applications quickly and at scale.
  • Zigi - Workflow assistant built for devs & their teams
  • Scout APM - Truly a developer’s best friend
  • Sonar - Write Clean JavaScript Code. Always.
  • winston

    A logger for just about everything.

    Winston — The most popular logging library, with support for multiple transports. This allows you to easily configure your preferred storage location for your logs.

  • pino

    🌲 super fast, all natural json logger

    PinoPino's biggest attraction is its speed. It claims to be up to five times faster than alternatives, in many cases.

  • InfluxDB

    Build time-series-based applications quickly and at scale.. InfluxDB is the Time Series Data Platform where developers build real-time applications for analytics, IoT and cloud-native services in less time with less code.

  • Bunyan

    a simple and fast JSON logging module for node.js services

    Bunyan — Another feature-rich logging framework that outputs in JSON by default and provides a CLI tool for viewing your logs.

  • PM2

    Node.js Production Process Manager with a built-in Load Balancer.

    When you encounter an uncaught exception or unhandled promise rejection, it is always considered good practice to crash the program. Use a process manager like PM2 to automatically restart the process and restore the program to a clean state.

  • winston-daily-rotate-file

    A transport for winston which logs to a rotating file each day.

    You can prevent your log files from getting too big by employing a log rotation solution that also handles cleaning up old logs. Even with this measure in place, it may be challenging to sift through the logs when you need to troubleshoot an issue (due to the sheer number of log files and entries and the distributed nature of most applications).

  • Zigi

    Workflow assistant built for devs & their teams. Automate the mundane part of your day, with live actionable messages for your GitHub & Jira tasks.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts