
Security News
NIST Officially Stops Enriching Most CVEs as Vulnerability Volume Skyrockets
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.
stupid simple logging for Node.js. Prints messages to stdout.
Create a logger:
var logger = require('fastlog')(category, level);
logger then has a functions named after each of the available log levels.
Levels are (in order of severity) debug, info, warn, error and fatal.
Both arguments are optional. category defaults to to "default" and level
defaults to "debug". Anything less severe than the given level will not be
logged.
The logger functions take a string (interpolation optional):
var logger = require('fastlog')('security', 'debug');
logger.debug('there is a %s in my %s!', 'snake', 'boot');
// [Fri, 05 Dec 2014 02:10:48 GMT] [debug] [security] there is a snake in my boot!
Or an Error object. Any string property that's tacked onto the object will be logged as well:
var err = new Error('someone poisoned the water hole!');
err.culprit = 'sid';
logger.error(err);
// [Fri, 05 Dec 2014 02:10:48 GMT] [error] [security] Error: someone poisened the water hole!
// at Module.runMain (module.js:492:10)
// at process.startup.processNextTick.process._tickCallback (node.js:244:9)
// culprit: sid
You can format your own prefix as well:
var logger = require('fastlog')('configured', 'error', '${level} [${ category }] <${timestamp}>');
logger.error('This town ain\'t big enough for the two of us!');
// error [configured] <Fri, 05 Dec 2014 02:10:48 GMT> This town ain't big enough for the two of us!
You may also use fastlog in shell scripts. First, make sure fastlog is installed globally
npm install -g fastlog
fastlog <level> [--category=<category>] [message]
> fastlog error --category important "You're my favorite deputy"
# [Fri, 05 Dec 2014 03:17:59 GMT] [error] [important] You're my favorite deputy
FASTLOG_LEVEL environment variable.FASTLOG_PREFIX environment variable.category is optional> export FASTLOG_LEVEL=info
> export FASTLOG_PREFIX='<${timestamp}>'
> fastlog debug "I think you've had enough tea for today, let's get you outta here, Buzz."
# (nothing prints)
> fastlog error "I think you've had enough tea for today, let's get you outta here, Buzz."
# <Fri, 05 Dec 2014 03:22:29 GMT> I think you've had enough tea for today, let's get you outta here, Buzz.
FAQs
Stupid simple logging for Node.js.
We found that fastlog 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
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.