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

vico-logger

v1.1.24

Published

Winston-based logger with daily rotate and Discord alert

Readme

vico-logger-discord

A powerful Node.js logger built on Winston, designed for development and production:

  • Daily log rotation for easy management
  • Sends error level logs (and optionally other levels) to Discord via webhook
  • Colorized console output for better readability during development
  • Fully compatible with ESM, CommonJS, and TypeScript

Installation

npm install vico-logger

Usage

JavaScript (ESM)

import logger from "vico-logger";

logger.info("Hello from ESM!");
logger.error("This will also send to Discord if webhook is set.");

JavaScript (CommonJS)

const logger = require("vico-logger");

logger.warn("Hello from CJS!");
logger.debug("This is a debug message.");

TypeScript

import logger from "vico-logger";

logger.verbose("Verbose log example");
logger.silly("Silly log example for testing purposes");

Environment Variables

DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/xxx/yyy
LOG_LEVEL=info
  • DISCORD_WEBHOOK_URL: Your Discord webhook URL (optional, only needed if you want error logs sent to Discord)
  • LOG_LEVEL: Minimum log level to log (default: info)

Winston Log Levels

vico-logger supports all default Winston log levels:

| Level | Numeric | Description | |------------|---------|------------------------------------------------------------------| | error | 0 | Critical errors, sent to Discord if webhook is configured | | warn | 1 | Warnings, important but non-critical issues | | info | 2 | General operational messages, e.g., server start, requests | | http | 3 | HTTP requests logs | | verbose | 4 | Detailed logs for debugging | | debug | 5 | Debug messages for development | | silly | 6 | Extremely detailed, usually only for testing and experimentation |

You can use any of these levels via logger.level("info") or directly:

logger.error("Critical error");
logger.debug("Debugging info");

Create a Discord Webhook

  1. Open Discord and select the server where you want the logs to appear.
  2. Go to Server Settings → Integrations → Webhooks.
  3. Click New Webhook.
  4. Give it a name (e.g., Logger Bot) and select the channel for logs.
  5. Click Copy Webhook URL → set it as DISCORD_WEBHOOK_URL in your .env file.

Example URL

https://discord.com/api/webhooks/123456789012345678/abcdefghijklmnopqrstuvwxyz

Example: Sending Logs to Discord

import logger from "vico-logger";

// This will appear in console and on Discord if level is 'error'
logger.error("Database connection failed!");

// Other levels will only appear in console by default
logger.info("Server started on port 3000");

This README now provides clear guidance for:

  • Installation & usage (ESM, CJS, TypeScript)
  • Environment variables setup
  • All Winston log levels and their purpose
  • Discord webhook setup and usage