
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
devnull is an advanced logging module for Node.js it was designed from the ground up to assist you during development and powerful in production. It works just like the console.log statements, it uses the same formatter, everything. This is basically a cherry on top :).
It automatically adds intelligent name spacing to all your log calls so you can easily spot where the log messages are coming from, without having to remember all the locations of your log statements.
The logger is build upon the EventEmitter prototype so you can listen when certain events are fired. You might want to send an e-mail out for every critical log message you receive. I know I would.
It comes with a ton of options, that could customize. Or not. It's up to you.
npm install devnull
var Logger = require('devnull')
, logger = new Logger;
This initializes the default logger. You can configure the logger by passing in a options object.
var Logger = require('devnull')
, logger = new Logger({ timestamp: false });
The available options:
env
either development or production, default is based on isatty.level
log level, defaults to 8.notification
when do start emitting notification errors, defaults to 1.timestamp
do the logs needs to stamped, defaults to true.pattern
pattern for the time stamp, defaults to node's util log format.The timestamp pattern is based on the 140bytes
gist but it also allows execution of functions
like {Fullyear} - {toLocaleTimeString}
The logger ships with these methods by default.
logger.critical('omg the server is on fire', { obj: 'works like console.log' });
FAQs
A simple logger with automatic function detection.
The npm package devnull receives a total of 31 weekly downloads. As such, devnull popularity was classified as not popular.
We found that devnull demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.