Socket
Socket
Sign inDemoInstall

@azure/logger

Package Overview
Dependencies
Maintainers
2
Versions
268
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/logger

Microsoft Azure SDK for JavaScript - Logger


Version published
Weekly downloads
5.1M
increased by15.39%
Maintainers
2
Weekly downloads
 
Created

What is @azure/logger?

@azure/logger is a logging utility provided by Microsoft Azure that allows developers to create and manage logs for their applications. It is designed to be lightweight and easy to use, making it suitable for both small and large-scale applications. The package provides various functionalities to control the logging level, format, and output destination.

What are @azure/logger's main functionalities?

Basic Logging

This feature allows you to create a logger instance and log messages at different levels such as info, warning, and error.

const { createClientLogger } = require('@azure/logger');
const logger = createClientLogger('my-namespace');
logger.info('This is an info message');
logger.warning('This is a warning message');
logger.error('This is an error message');

Setting Log Level

This feature allows you to set the log level, so only messages at that level or higher will be logged. In this example, only warning and error messages will be logged.

const { setLogLevel } = require('@azure/logger');
setLogLevel('warning');
const { createClientLogger } = require('@azure/logger');
const logger = createClientLogger('my-namespace');
logger.info('This info message will not be logged');
logger.warning('This warning message will be logged');

Custom Loggers

This feature allows you to create custom loggers with different namespaces, which can help in organizing and filtering logs based on different parts of your application.

const { createClientLogger } = require('@azure/logger');
const customLogger = createClientLogger('custom-namespace');
customLogger.info('This is a custom info message');

Other packages similar to @azure/logger

Keywords

FAQs

Package last updated on 02 Aug 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc