
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
@azure/logger
Advanced tools
The @azure/logger package can be used to enable logging in the Azure SDKs for JavaScript.
Logging can be enabled for the Azure SDK in the following ways:
DEBUG environment variable.Note that AZURE_LOG_LEVEL, if set, takes precedence over DEBUG. Only use DEBUG without specifying AZURE_LOG_LEVEL or calling setLogLevel.
Install this library using npm as follows
npm install @azure/logger
The @azure/logger package supports the following log levels
specified in order of most verbose to least verbose:
When setting a log level, either programmatically or via the AZURE_LOG_LEVEL environment variable,
any logs that are written using a log level equal to or less than the one you choose
will be emitted.
For example, setting the log level to warning will cause all logs that have the log
level warning or error to be emitted.
NOTE: When logging requests and responses, we sanitize these objects to make sure things like Authorization headers that contain secrets are not logged.
Request and response bodies are never logged. Headers are redacted by default, unless present in the following list or explicitly allowed by the client SDK:
const { EventHubClient } = require('@azure/event-hubs');
const logger = require('@azure/logger');
logger.setLogLevel('info');
// operations will now emit info, warning, and error logs
const client = new EventHubClient(/* params */);
client.getPartitionIds()
.then(ids => { /* do work */ })
.catch(e => { /* do work */ });
});
const { AzureLogger, setLogLevel } = require("@azure/logger");
setLogLevel("verbose");
// override logging to output to console.log (default location is stderr)
AzureLogger.log = (...args) => {
console.log(...args);
};
Using AzureLogger, it is possible to redirect the logging output from the Azure SDKs by
overriding the AzureLogger.log method. This may be useful if you want to redirect logs to
a location other than stderr.
You can build and run the tests locally by executing rushx test. Explore the test folder to see advanced usage and behavior of the public classes.
If you run into issues while using this library, please feel free to file an issue.
If you'd like to contribute to this library, please read the contributing guide to learn more about how to build and test the code.

Winston is a versatile logging library for Node.js that supports multiple transports (e.g., console, file, HTTP) and log levels. It is highly configurable and can be extended with custom transports and formats. Compared to @azure/logger, Winston offers more flexibility and a broader range of features, but it may be more complex to set up.
Bunyan is a simple and fast JSON logging library for Node.js. It is designed to produce logs in a structured JSON format, making it easy to parse and analyze. Bunyan also supports log levels and multiple output streams. Compared to @azure/logger, Bunyan focuses on JSON logging and may be more suitable for applications that require structured log data.
Pino is a fast and low-overhead logging library for Node.js. It is designed for high-performance logging and produces logs in a JSON format. Pino supports log levels and can be integrated with various transports and log management systems. Compared to @azure/logger, Pino is optimized for performance and may be a better choice for applications with high logging throughput.
FAQs
Microsoft Azure SDK for JavaScript - Logger
The npm package @azure/logger receives a total of 4,157,773 weekly downloads. As such, @azure/logger popularity was classified as popular.
We found that @azure/logger demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.