
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.
@pager/logger
Advanced tools
Logging library for your verbose projects.
Works basically as a wrapper for Bunyan's console and [console
] and [raven
] transports. For more details on how to work with Bunyan, take a look at its documentation or see configuration below for the setup details.
'use strict';
const logger = require('@pager/logger');
logger.info({ foo: 'bar' }, 'Everyone knows %s', 'the dice are loaded');
PROTIP: When running your app, remember you can get pretty output by simply piping it to
bunyan
:godmode: .
For detailed usage examples, take a look at the examples
folder.
Most of the bundled transports can be configured on your app by simply declaring a log
key on your config settings.
{
"log": {
"patchGlobal": true,
"levels": {
"console": "debug"
}
}
}
In order to enable the Sentry/Raven transport, the SENTRY_DSN
env var needs to be set.
This is a private npm package, so make sure you have something that resembles the following .npmrc
on your project's folder:
@pager:registry=http://npme.techcareinc.com:8080/
//npme.techcareinc.com:8080/:_authToken=${NPM_TOKEN}
Note that this requires the NPM_TOKEN
env var to be exported as a GitHub Personal Access Token.
You can extend the default functionality of this module by adding your own transports:
'use strict'
// Require the transport
const localFileTransport = require('winston').transports.File;
// Require the logger
const logger = require('@pager/logger');
// Add and setup the transport
logger.add(localFileTransport, { name: 'localFile', filename: 'test.log' });
FAQs
Logging library
We found that @pager/logger demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 89 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.