Better Programming

Advice for programmers.

Follow publication

Member-only story

Comparing 5 Node.js Logging Libraries for You To Make the Optimal Choice

Picking the right library for the job is crucial

Geshan Manandhar
Better Programming
Published in
5 min readMar 15, 2021

--

Wood logs
Image by 5598375 from Pixabay.

Using the right Node.js logging library can give you unprecedented insight into how your application is working. Having proper logging is equivalent to having a powerful telescope in a space with all your applications.

Do you want to be able to see how your application behaves under load in production? In this article, we are going to analyze five popular Node.js logging libraries that can easily do the job for you. All of them are available on NPM and are downloaded more than 1 million times each week, so they are pretty darn popular.

Let’s get started!

Assumptions

  1. You are familiar with how Node.js works and can run Node locally.
  2. You can install npm libraries and have basic knowledge of package.json and the npm CLI.

We will use Express.js as an example app to see code examples writing logs to the console for all of the Node.js logging libraries.

1. Winston

Winston is a popular logging library. It is designed to be simple and enables universal logging with support for multiple transports. Winston defines itself as “a logger…

--

--

Geshan Manandhar
Geshan Manandhar

Written by Geshan Manandhar

Senior Software Engineer, Agile follower. Technologist, Google Developer Expert. Blogging at geshan.com.np

No responses yet

Write a response