My new coloured-logs Node package!

I made a npm package called coloured-logs that basically gives you functions to log to the console with some colour! It also has a timestamp feature.

Here is the link:

Quickstart if you’re too busy to read

NPM installation:

$ npm install coloured-logs

Package usage:

const cons = require("coloured-logs");

cons.success("Message sent!");"Request received!");
cons.error("Could not process file");
cons.response("Request returned status 200");
cons.server("Server listening on port 3000");

Please give feedback/bug reports by replying to this post, thanks :grin:



Why call it cons?

1 Like

I haven’t tested, but if it was console, maybe that would overwrite the console object :person_shrugging:

The built-in console object has log and error functions, with which you can print text in standard and red colors. But printing red text in this way is not the best idea.

Your module (or as it is called in js) solves this problem! It is very useful for debugging.


I also found that the Replit console, console.error displays just like console.log, which isn’t useful.

1 Like

Then this package is indispensable in Replit.