
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.
just-logging
Advanced tools
This module provides very simple logging, and nothing else, for nodejs modules.
There are so many logging framework that it was faster to write one than to find the right one for me. Usage and output kind of mimics log4j.
Install from npm:
npm install just-logging
Get a logger with the default name (the current module filename):
var logger = require('logger').getLogger();
Get a module with a specific name:
var logger = require('logger').getLogger('MY-LOGGER');
Log messages at different log levels:
logger.debug('Calibrating hyperplan gyroscopes...');
logger.info('Running system checks %d out of %d', i, total);
logger.warn('Polarization failure, switching to backup generator', error);
logger.warn('Catastrophic failure!', error);
With the default settings, this outputs the following:
[2012-09-23T07:04:37.990Z][WARN][6649][EngineSubSystem] Object.<anonymous>():14 Polarization failure, switching to backup generator [Error: null]
[2012-09-23T07:04:37.996Z][DEBUG][6649][EngineSubSystem] init():4 Calibrating hyperplan gyroscope...
[2012-09-23T07:04:37.997Z][INFO][6649][EngineSubSystem] runChecks():10 Running system checks 12 out of 287
[2012-09-23T07:04:37.997Z][ERROR][6649][EngineSubSystem] shutdown():18 Catastrophic failure! [Error: Divided by e^(pi * i) + 1]
The minimum level of the messages to log can be changed.
Levels allowed are OFF, DEBUG, INFO, WARN, ERROR:
logger.level = 'WARN';
The level can also be changed for an other logger instance. For instance, to reduce or turn off a noisy module:
logger.getLogger('noisy-module.js').level = 'OFF';
logger.format = '[%d{JSON}][%p][%t][%c] %M:%L %m';
Variables allowed in the format string:
%d: date
%d{FORMAT}: formatted date. Possible formats include:
%p: type (INFO, DEBUG, etc)
%t: process id
%c: logger name
%M: method name
%L: line number
%m: message
github repository:
https://github.com/freongrr/node-just-logging
FAQs
Simple logging, nothing else.
The npm package just-logging receives a total of 4 weekly downloads. As such, just-logging popularity was classified as not popular.
We found that just-logging 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.