
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
@ruanitto/slack-logger
Advanced tools
Bunyan-compatible logger that send pretty formatted messages to a Slack channel.
Sends pretty formatted messages to a Slack channel.

This package is distributed via npm
npm install slack-logger
Recommended way of using logging and the slack logger in your application is by using the provided Logger class that's a simple abstraction on top of Bunyan for getting component-specific loggers. See the examples/4-example-logger.ts for details.
import logger from "./services/logger";
// use the logger.get(componentName, filename) in each file to log for a specific component
const log = logger.get("register", __filename);
// logging message and info separately is recommended as the info gets nicely formatted and message becomes searchable
log.info(
{
user: {
name: "Jack Daniels",
email: "jack@daniels.com",
},
},
"user was successfully registered",
);
Take a look at the examples folder. It shows how to use the library for custom manual integrations, using it with Bunyan and Winston and also using the provided Logger class that uses Bunyan.
The examples can be run with npm start. They use a .env file for configuration, a .env-example file is provided (just copy it to .env file and change accordingly). Alternatively is the configuration file does not exist, the npm start script will ask for the details in the console and generates the configuration file.
Responding to slack channel messages is as easy as registering a simple handler.
// example of adding a custom message handler
slackLog.addMessageHandler({
getName: () => "restart",
getDescription: () => "restarts the application",
handleMessage: (_message, log) => {
log.post("restarting the application..");
restart(); // implement this in some way
},
});
An optional console logger for Bunyan is provided that outputs the same information formatted nicely for the console.

To use this, simply register instance of ConsoleLog as a Bunyan stream.
import { ConsoleLog } from "slack-logger";
// register the console logger
logger.addStream({
name: "console",
level: "info",
type: "raw",
stream: new ConsoleLog({
basePath: path.join(__dirname, "..", ".."), // configure to point to the root of the project
}),
});
npm start to run the examples (prompts for configuration and choice of example).npm build to build the production version.npm test to run tests without code coverage.npm run coverage to run tests with code coverage.npm run lint to lint the codebase.npm run prettier to run prettier.npm run audit to run all pre-commit checks (prettier, build, lint, test). Run this before pull requests.FAQs
Bunyan-compatible logger that send pretty formatted messages to a Slack channel.
The npm package @ruanitto/slack-logger receives a total of 1 weekly downloads. As such, @ruanitto/slack-logger popularity was classified as not popular.
We found that @ruanitto/slack-logger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.