
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
consoleplusplus
Advanced tools
consoleConsole++ makes your console awesomeR. Colours, logging level and shit
like that.
And it works with both PhantomJS and NodeJS (and pretty much any proper JavaScript runtime).
npm install consoleplusplus
Like this:
// here console is not that awesomeR
require("consoleplusplus");
// or
require("./console++.js"); //< if downloaded locally
// now console is very awesomeR!!!
Console++ adds a bit of sparkling power to your shy little console. It's not a fancy logging library with all the bells and whistles - it's a "poor man" logger that you can drop in your code without having to rewrite it.
Here is for the lazy developer!
Ehm, like a console genius! Just type stuff like:
console.log("A (boring) console.log message");
console.debug("An (irrelevant) console.debug message");
console.info("A (somewhat important) console.info message");
console.warn("A (quite important) console.warning message");
console.error("A (critical!) console.error message");
and you get:

Yes, it manipulates the console object (oh, the horror!) so that you can
have some fancy colours, timestamped messages and a bit more. Output looks like:
[LEVEL - TIMESTAMP] THE_MESSAGE
Not all messages are printed. It introduces the concept of level (set via
console.setLevel(level)): as you would expect, it goes from DEBUG (lowest,
that corresponds to print all the things) to ERROR (highest, that
corresponds to print only the errors).
By default the LEVEL portion of the message is coloured (see below how
to disable this). Also, you can enable matching colouring for THE_MESSAGE
(see methods listing below).
One nifty feature (I think) it's that you have fine-grained control over
THE_MESSAGE. You can wrap text within #COLOR{TEXT_TO_COLOR} like:
var message = "#red{this} is #cyan{a} #yellow{nice} message";
console.debug(message);
to print something like:

PLEASE, do read the code to learn more.
Console++ adds some few little methods to the console so you can tune
it a bit, based on your taste.
I'd like to be very lazy and say "go read the code", but I guess I can list here those methods.
console.LEVELS = _LEVELS;
// Set/Get Level
console.setLevel(level); //< default `DEBUG`
console.getLevel();
console.getLevelName(level);
console.getLevelColor(level);
console.isLevelVisible(levelToCompare);
// Enable/Disable Colored Output
console.enableColor(); //< default enabled
console.disableColor();
console.isColored();
// Enable/Disable Colored Message Output
console.enableMessageColor(); //< default disabled
console.disableMessageColor();
console.isMessageColored();
// Enable/Disable Timestamped Output
console.enableTimestamp(); //< default enabled
console.disableTimestamp();
console.isTimestamped();
// Enable/Disable Equal Spacing on Level Name
console.enableEqualSpacing(); //< default enabled
console.disableEqualSpacing();
console.isEqualSpaced();
// Set OnOutput Callback (useful to write to file or something)
// Callback: `function(formattedMessage, levelName)`
console.onOutput(callback); //< default `null`
{ and } are reserved: using those will produce an undefined resultKeep calm and make awesome.
This project is licensed under BSD 3-Clause "New" or "Revised" License.
FAQs
Console++ - enhance your console
The npm package consoleplusplus receives a total of 192 weekly downloads. As such, consoleplusplus popularity was classified as not popular.
We found that consoleplusplus demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.