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.
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.
npm install Console or
yarn add Console
const Console = require("Console"); or
import Console from "Console"
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.
npm install logdown or
yarn add logdown
const logdown = require("logdown"); or
import logdown from "logdown"
Note: Using isEnabled state the log method can be enabled or disabled.
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.
npm install consola or
yarn add consola
const consola = require("consola"); or
import consola from "consola"
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.
npm install ololog or
yarn add ololog
const log = require("ololog"); or
import log from "ololog"
Note: It’s not compulsory to use the configure method.
Thanks for Reading