npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

slack-logger-light

v0.1.3

Published

Zero dependency logger for slack, super light, great for service workers

Downloads

2

Readme

slack-logger-light

This is a simple slack to channel logger, is super light practically a fetch call to the slack api, it needs the app token, and the channel id, you can use multiple instances to log to multiple channels.

pkg: slack-logger-light

Super basic perfect for constrained environments, like cloud functions, or small projects, less than 1kb.

Basic Usage

import { SlackLogger } from 'slack-logger-light';

const logger = new SlackLogger({
    APP_TOKEN: 'xoxb-1234567890-1234567890123-12345678901234567890123456789012', // Your app token
    CHANNEL_ID: 'C1234567890', // The channel id can be copied from slack APP, or from the channel url
});

logger.log('Hello World');

Notes

  • Message is sent raw you can use markdown slack syntax, for additional formatting.
  • You can change the channelId, or the app token, if you don't want to create new instances.
  • You can use multiple instances to log to multiple channels.
  • Make sure that your app has the correct permissions to post to the channel and that the channel exists and is public or the app has access to it(for private channels app needs to be added to the channel).
  • In case of errors, logger will console.error the error but will not throw any errors, the message will not be sent slack, you can disable the console.error by setting the optional NO_CONSOLE_LOG_ON_ERROR to true when creating the instance.
  • There are some basic bun tests, that you can run with bun test if you create a .env file following the .env.example file.

Other logger integrations

You can easily integrate this logger with other loggers, by creating a custom transport.

There's an example integration with @tsed/logger in the examples folder, you can use it as a reference to integrate with other loggers.

Changelog

Changelog