Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@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.46.0 (2022-01-07)
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 15,778,744 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
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.