
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@debugr/slack
Advanced tools
This log handler will send each entry with a log level at or above a configured threshold as a message to a configured Slack channel.
npm install --save @debugr/slack
import { Logger, LogLevel } from '@debugr/core';
import { SlackHandler } from '@debugr/slack';
const globalContext = {
applicationName: 'example',
};
const logger = new Logger(globalContext, [
new SlackHandler({
threshold: LogLevel.FATAL,
webhookUrl: 'your slack webhook url',
}),
]);
logger.fatal('Something failed miserably!');
The SlackHandler constructor accepts a required options object
with the following keys as the first argument:
| Option | Type | Default | Description |
|---|---|---|---|
webhookUrl | string | (required) | A Slack webhook URL; see the Slack API docs on how to obtain one. |
threshold | LogLevel | LogLevel.ERROR | The lowest level of entries which will be posted to the configured channel. Any entries below this level will be ignored. |
channel | string | The Slack channel ID the message should be posted to. This only works with legacy Slack webhooks. | |
username | string | The slack username the message should be posted under. This only works with legacy Slack webhooks. | |
iconUrl | string | The URL of an icon to be used in place of the default icon. This only works with legacy Slack webhooks. | |
iconEmoji | string | An emoji code string to use in place of the default icon. This only works with legacy Slack webhooks. | |
errorCallback | (err: Error) => void | (see description) | A callback which will be called when sending a message to Slack fails. The default callback will simply log the error into the console. |
bodyMapper | (entry: LogEntry) => Record<string, any> | (see description) | A callback mapping the log entry to payload to be sent to the configured webhook URL. At a minimum the payload must include a text key with a string content. |
FAQs
Elastic log handler to debugr
The npm package @debugr/slack receives a total of 10 weekly downloads. As such, @debugr/slack popularity was classified as not popular.
We found that @debugr/slack demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.