
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.
Pince is a lightweight logger that combines some of the best properties of log4j and node. It's equally usable in Node, (most) browsers, and Meteor (client and server).
It was developed for MadEye.
Features:
myLibrary:aModule:thisObject.To install, npm install pince.
In any file you wish to make a logger, require it via
Logger = require('pince');
To install, just meteor add jag:pince. The global Logger symbol will be
there waiting for you.
By default, on the server Meteor will prepend a string to logs that includes
a timestamp (amongst other things). To silence Meteor's prefix, run meteor
with the --raw-logs flag: meteor --raw-logs.
Set the log level:
//Default is info
Logger.setLevel('trace');
Make a new logger:
var log = new Logger('router');
log.info("Routing.");
//2013-10-31 11:29:36.097 info: [router] Routing.
log.trace("Setting up routes...");
//2013-10-31 11:29:36.101 trace: [router] Setting up routes...
Set individual levels:
Logger.setLevel('info');
Logger.setLevel('controller', 'trace');
var routerLog = new Logger('router');
var controllerLog = new Logger('controller');
routerLog.trace("Can't hear me!");
//Nothing
controllerLog.trace("Can hear me.");
//2013-10-31 11:31:21.906 trace: [controller] Can hear me.
Logger.setLevels({router:'debug', controller:'warn'});
routerLog.info("Finally! Someone is listening to me.");
//2013-10-31 11:32:48.374 info: [router] Finally! Someone is listening to me.
controllerLog.info("Hello? Hello??");
//Nothing
Hierarchically name and set levels:
var routerLog = new Logger('myPackage:router');
var controllerLog = new Logger('myPackage:controller');
Logger.setLevel('myPackage', 'info');
Logger.setLevel('myPackage:controller', 'debug');
routerLog.info('You can see this.');
routerLog.debug('You cannot see this; myPackage level is set to info.');
controllerLog.debug('You can see this, myPackage:controller level is set to debug.');
FAQs
A logger for node inspired by log4j and commons-logging.
The npm package pince receives a total of 6 weekly downloads. As such, pince popularity was classified as not popular.
We found that pince 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.