
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.
@aws-sdk/middleware-logger
Advanced tools
[](https://www.npmjs.com/package/@aws-sdk/middleware-logger) [](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.198.0 (2022-10-27)
FAQs
[](https://www.npmjs.com/package/@aws-sdk/middleware-logger) [](https://www.npmjs.com/package/@
The npm package @aws-sdk/middleware-logger receives a total of 15,727,711 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
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.