Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@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.
3.460.0 (2023-11-28)
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 12,543,188 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
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.