Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@types/pino
Advanced tools
Stub TypeScript definitions entry for pino, which provides its own types definitions
@types/pino provides TypeScript type definitions for the Pino logging library, which is a fast and low-overhead logging library for Node.js applications.
Basic Logging
This feature allows you to create a basic logger instance and log messages at the 'info' level.
const pino = require('pino');
const logger = pino();
logger.info('Hello, world!');
Custom Log Levels
This feature allows you to define custom log levels for more granular logging.
const pino = require('pino');
const logger = pino({
customLevels: {
foo: 35
}
});
logger.foo('This is a custom log level');
Child Loggers
This feature allows you to create child loggers that inherit properties from the parent logger.
const pino = require('pino');
const logger = pino();
const child = logger.child({ a: 'property' });
child.info('Hello from child logger');
Log Redaction
This feature allows you to redact sensitive information from logs.
const pino = require('pino');
const logger = pino({
redact: ['req.headers.authorization']
});
logger.info({ req: { headers: { authorization: 'secret' } } }, 'Request received');
@types/winston provides TypeScript type definitions for the Winston logging library, which is a versatile and widely-used logging library for Node.js. Winston offers features like multiple transports, log levels, and formatters, making it a more feature-rich but potentially slower alternative to Pino.
@types/bunyan provides TypeScript type definitions for the Bunyan logging library, which is another fast and JSON-based logging library for Node.js. Bunyan offers features like log streams and serializers, making it similar in performance to Pino but with a different API and feature set.
This is a stub types definition for @types/pino (http://getpino.io).
pino provides its own type definitions, so you don't need @types/pino installed!
FAQs
Stub TypeScript definitions entry for pino, which provides its own types definitions
The npm package @types/pino receives a total of 459,327 weekly downloads. As such, @types/pino popularity was classified as popular.
We found that @types/pino 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
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.