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.
@aws-sdk/middleware-logger
Advanced tools
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/middleware-logger/latest.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-logger) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/middleware-logger.svg)](https://www.npmjs.com/package/@
The @aws-sdk/middleware-logger package is a middleware for AWS SDK for JavaScript (v3) that logs information about AWS SDK requests and responses. It can be used to debug and monitor API calls made through the AWS SDK.
Logging AWS SDK requests and responses
This feature allows you to add logging middleware to your AWS SDK client instances. It logs requests and responses, which is useful for debugging and monitoring purposes.
const { S3Client } = require('@aws-sdk/client-s3');
const { loggerMiddleware } = require('@aws-sdk/middleware-logger');
const { LogLevel } = require('@aws-sdk/types');
const client = new S3Client({});
client.middlewareStack.add(loggerMiddleware({ logLevel: LogLevel.INFO }), {
step: 'initialize',
name: 'loggerMiddleware',
tags: { LOGGER: 'LOGGER' },
});
// Now, when you make a request using the client, it will log the request and response.
Winston is a popular logging library for Node.js. Unlike @aws-sdk/middleware-logger, which is specific to AWS SDK, winston is a generic logging library that can be used in any Node.js application. It supports multiple transports (e.g., console, file, HTTP) and is highly configurable.
Morgan is an HTTP request logger middleware for Node.js applications, commonly used with Express.js. It logs requests and responses, similar to @aws-sdk/middleware-logger, but is focused on HTTP server logging rather than AWS SDK operations.
Pino is a very low overhead Node.js logger, which can be used in a variety of applications, including as a logger for HTTP servers. It is designed for speed and produces logs in JSON format. Pino is not specific to AWS SDK like @aws-sdk/middleware-logger, but it can be used to log any application activity.
Bunyan is a simple and fast JSON logging library for Node.js services. Like @aws-sdk/middleware-logger, it can log request and response information, but it is not limited to AWS SDK and can be used for general-purpose logging in Node.js applications.
FAQs
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/middleware-logger/latest.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-logger) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/middleware-logger.svg)](https://www.npmjs.com/package/@
The npm package @aws-sdk/middleware-logger receives a total of 7,869,366 weekly downloads. As such, @aws-sdk/middleware-logger popularity was classified as popular.
We found that @aws-sdk/middleware-logger demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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
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.