![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
@changesets/logger
Advanced tools
Package description
@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.
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');
Winston is a versatile logging library for Node.js that supports multiple transports (e.g., console, file, HTTP). It is more feature-rich compared to @changesets/logger, offering advanced logging capabilities such as log levels, custom formats, and more.
Pino is a fast and low-overhead logging library for Node.js. It is designed for high-performance logging and is suitable for production environments. Compared to @changesets/logger, Pino offers better performance and more advanced features like log redaction and serializers.
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 logs. Bunyan offers more advanced features than @changesets/logger, such as log streams and child loggers.
Readme
import { error } from '@changesets/logger";
error('message part 1', 'message part 2');
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.
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
Console log alias
The npm package @changesets/logger receives a total of 584,172 weekly downloads. As such, @changesets/logger popularity was classified as popular.
We found that @changesets/logger demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.