Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Straight-forward logging module.
console.log
, no events, no nextTick()
var log = require( __dirname + "/lib/log.js" ).module( "demo" );
log.info( "Logging without source tracing" );
log.notice( "Initializing application...\nwow\nsuch application" );
log.critical( new Error( "Logging an Error instance." ) );
log.withSource();
log.info( "Logging WITH source tracing" );
log.notice( "You'll never know where this was logged from!" );
log = require( __dirname + "/lib/log.js" );
log.warn( "We don't need no prefix!" );
log = require( __dirname + "/lib/log.js" ).module( "something weird" );
log.warn( "...or do we?" );
log = require( __dirname + "/lib/log.js" );
log.notice( "You're using a longer prefix? I'll adjust." );
log = require( __dirname + "/lib/log.js" ).module();
log.error( "ouch" );
// Wrap morgan
app.use( require( "fm-log" ).module( "HTTP" ).morgan( {format : "dev"} ) );
Install
npm install fm-log
Put this in every file where you want to log:
var log = require( "fm-log" ).module();
Then just use log.info
or one of the other logging levels shown above.
For loggers without a specific prefix, just require()
the module and use it directly:
var generic = require( "fm-log" );
generic.notice( "We don't need no prefix" );
FAQs
Console logging facility for Node
The npm package fm-log receives a total of 3 weekly downloads. As such, fm-log popularity was classified as not popular.
We found that fm-log 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
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.