
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.
logger class based on rule-functions. uses the console, a file and trigger an event for more complex action.
is a super simple logger class for nodeJS. It's part of the VisualWeb Framework (currently not public). it will log to the console, a (mongoDB) database, a file. just pass the configuration options when instantiating a new logger and there you go.
Logger = require('logger');
var log = new Logger(
{
log2console:true,
rules: {
minLogLevel: function(config, logTarget, content, sender, logLevel) {
if (logLevel < 2) return false;
return true;
}
}
},
function(loggerInstance) {
// if you chose log2database, you will need to wait for the
// callback to be able to actually log...
}
);
log.add('this is a message', 'cyan', 'byTest', 2);
Loglevels:
error (1):
myLogger.error('Test ERROR message.', 'red', 'examples');
warn (2):
myLogger.warn('Test WARN message.', 'yellow', 'examples');
info (3):
myLogger.info('Test INFO message.', 'green', 'examples');
debug (4):
myLogger.debug('Test DEBUG message.', 'blink', 'examples');
trace (5):
myLogger.trace('Test TRACE message.', 'white', 'examples');
If you are not sure how to use these loglevels, here is a nice description.
FAQs
logger class based on rule-functions. uses the console, a file and trigger an event for more complex action.
The npm package lg receives a total of 6 weekly downloads. As such, lg popularity was classified as not popular.
We found that lg 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.