Socket
Socket
Sign inDemoInstall

@changesets/logger

Package Overview
Dependencies
1
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @changesets/logger

Console log alias


Version published
Weekly downloads
716K
increased by10.28%
Maintainers
3
Created
Weekly downloads
 

Package description

What is @changesets/logger?

@changesets/logger is a logging utility designed to be used with the Changesets tool. It provides a simple and consistent way to log messages, warnings, and errors during the process of managing versioning and changelogs for a monorepo or multi-package repository.

What are @changesets/logger's main functionalities?

Logging Info Messages

This feature allows you to log informational messages. The `info` function is used to log messages that are meant to inform the user about the current state or progress of a process.

const { info } = require('@changesets/logger');
info('This is an info message');

Logging Warning Messages

This feature allows you to log warning messages. The `warn` function is used to log messages that indicate a potential issue or something that the user should be cautious about.

const { warn } = require('@changesets/logger');
warn('This is a warning message');

Logging Error Messages

This feature allows you to log error messages. The `error` function is used to log messages that indicate a failure or critical issue that needs immediate attention.

const { error } = require('@changesets/logger');
error('This is an error message');

Logging Success Messages

This feature allows you to log success messages. The `success` function is used to log messages that indicate a successful operation or completion of a task.

const { success } = require('@changesets/logger');
success('This is a success message');

Other packages similar to @changesets/logger

Readme

Source

@changesets/logger

View changelog

Usage

import { error } from '@changesets/logger";

error('message part 1', 'message part 2');

Package Exports

error: Use error to print error messages upon which users which immediately action to complete the task.

info: Use info to print informational messages to user.

log: Use log to print messages don't fall in anyother specific category. For example, message to show title of the step being performed by the changesets tool.

success: Use success to assert to users that their instructions have completed succesfully.

warn: Use warn to print warning messages, something that user could action on now or later without much impact of their work.

Silencing Messages In Tests

Use the @changesets/test-utils package to silence the logs in test cases.

For example:

import { temporarilySilenceLogs } from "@changesets/test-utils";
import { log } from "@changesets/logger";

temporarilySilenceLogs();

// Now the logs in this test file are not actually logged to std out
log("I am not logged");

// Use console.log to log messages in tests if required
console.log("Yiey, I am logged");

FAQs

Last updated on 15 Apr 2020

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc