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

@wdio/logger

Package Overview
Dependencies
Maintainers
3
Versions
128
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wdio/logger

A helper utility for logging of WebdriverIO packages

  • 9.0.0-alpha.367
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2M
decreased by-24.85%
Maintainers
3
Weekly downloads
 
Created

What is @wdio/logger?

The @wdio/logger package is a utility used within the WebdriverIO testing framework to facilitate logging. It allows developers to create namespaced loggers that can be used to output messages to the console or to files, depending on the configuration. It is designed to work seamlessly with the WebdriverIO ecosystem but can also be used independently for logging purposes in Node.js applications.

What are @wdio/logger's main functionalities?

Creating a Logger Instance

This feature allows you to create a new logger instance with a specific namespace. You can then use this instance to log messages at different levels, such as info, warn, error, etc.

const logger = require('@wdio/logger').default('my-logger');
logger.info('This is an info message.');

Setting Log Levels

This feature allows you to set the log level for a specific logger instance. Messages below the set level will not be logged.

const logger = require('@wdio/logger').default('my-logger');
logger.setLevel('info');
logger.info('This will be logged.');
logger.debug('This will not be logged.');

Logging Messages

This feature is used to log messages at different severity levels. The available methods are info, warn, error, and others, each corresponding to a level of importance.

const logger = require('@wdio/logger').default('my-logger');
logger.info('Informational message');
logger.warn('Warning message');
logger.error('Error message');

Other packages similar to @wdio/logger

Keywords

FAQs

Package last updated on 11 Jul 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