Alternative libraries for Console.log() for your next JavaScript Project

Manish Mandal
Nov 12 · 3 min read
Image for post
Image for post

If you are a JavaScript developer you must be using console.log() for debugging your JavaScript project. But do you know that there are some alternative libraries to console.log() . These libraries can be used in your next Node, React, Angular, or Vue projects. So let us see what are those libraries and how to use them.

1. Console

Console is a lightweight library that can be used as an alternative to console.log() . The best part about Console is that apart from supporting warn, info, log, or error method it also supports success, debug, and stress method.

Usage

Install : npm install Console or yarn add Console

Import: const Console = require("Console"); or import Console from "Console"

Image for post
Image for post
Image for post
Image for post

2. Logdown

Logdown is a debug utility for the browser and the server with Markdown support, providing a single interface and a similar behavior between the browser and the server.

The best part about logdown is that you can pass the name of your module and it will return a decorated console.

Usage

Install : npm install logdown or yarn add logdown

Import: const logdown = require("logdown"); or import logdown from "logdown"

Note: Using isEnabled state the log method can be enabled or disabled.

Image for post
Image for post
Image for post
Image for post

3. Consola

Consola is the most used logger libraries available for Node.js and Browser. It has 1.5 million downloads weekly. You can also pause or resume your logs with consola.

Usage

Install : npm install consola or yarn add consola

Import: const consola = require("consola"); or import consola from "consola"

Image for post
Image for post
Image for post
Image for post

4. Ololog

Ololog is a library you can use to display your log messages in console with different styling. It supports text color, background color, italic, etc to display your log messages.

Usage

Install: npm install ololog or yarn add ololog

Import: const log = require("ololog"); or import log from "ololog"

Note: It’s not compulsory to use the configure method.

Image for post
Image for post
Image for post
Image for post

Hope this article will be useful for your next JavaScript project.

Thanks for Reading

JavaScript In Plain English

New JavaScript + Web Development articles every day.

Manish Mandal

Written by

Fullstack developer with expertise in WordPress and React. Writing code for humans. Add me on Linkedin https://www.linkedin.com/in/manishmandal21/

JavaScript In Plain English

New JavaScript + Web Development articles every day.

Manish Mandal

Written by

Fullstack developer with expertise in WordPress and React. Writing code for humans. Add me on Linkedin https://www.linkedin.com/in/manishmandal21/

JavaScript In Plain English

New JavaScript + Web Development articles every day.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store