Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@walletconnect/logger

Package Overview
Dependencies
Maintainers
10
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@walletconnect/logger

Logger Utils

  • 2.1.2
  • canary
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
357K
decreased by-3.51%
Maintainers
10
Weekly downloads
 
Created

What is @walletconnect/logger?

@walletconnect/logger is a logging utility designed to be used with WalletConnect projects. It provides a simple and consistent way to log messages, errors, and other information, making it easier to debug and maintain WalletConnect applications.

What are @walletconnect/logger's main functionalities?

Basic Logging

This feature allows you to log messages at different levels (info, warn, error). The logger is instantiated with a context name ('my-app' in this case) to help identify the source of the logs.

const { Logger } = require('@walletconnect/logger');
const logger = new Logger('my-app');
logger.info('This is an info message');
logger.warn('This is a warning message');
logger.error('This is an error message');

Custom Log Levels

This feature allows you to set custom log levels. In this example, the logger is configured to use the 'debug' level, enabling more granular logging.

const { Logger } = require('@walletconnect/logger');
const logger = new Logger('my-app', { level: 'debug' });
logger.debug('This is a debug message');

Log Formatting

This feature allows you to customize the format of the log messages. In this example, the log messages are formatted to include the log level in uppercase.

const { Logger } = require('@walletconnect/logger');
const logger = new Logger('my-app', { format: (level, message) => `[${level.toUpperCase()}] ${message}` });
logger.info('This is a formatted info message');

Other packages similar to @walletconnect/logger

Keywords

FAQs

Package last updated on 08 Apr 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