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

logger-chroma

v1.0.9

Published

πŸ¦„ A colorful, developer-friendly Node.js logger with timestamps, emojis, pretty-printed objects, and grouped logs for clear, readable output.

Readme

logger-chroma

  • 🎨 A lightweight, high-performance Node.js logging utility designed for developers who need to visualize complex, nested operations. logger-chroma transforms flat, messy console outputs into a beautiful, structured tree that makes debugging logical flows intuitive.
  • πŸ‘¨β€πŸ’» Optimized for modern terminals like Windows Terminal, VS Code Integrated Terminal, iTerm2, and Windows Git Bash Terminal where box-drawing characters are rendered natively.
  • ♻️ Works seamlessly with CommonJS, ESM and TypeScript

πŸ“¦ Install via NPM

$ npm i logger-chroma

πŸ’» Usage

  • See examples below

ESM (Random example)

import loggerChroma from 'logger-chroma';

// --| Server start
loggerChroma.info("Server starting on port", 3000, "πŸš€");

// --| Environment info
loggerChroma.debug({ env: process.env.NODE_ENV || "development", version: "1.0.0" }, "πŸ’‘", "Current environment");

// --| Full HTTP request handling example
loggerChroma.group("HTTP GET /users", () => {
    loggerChroma.info("Request received", "πŸ“₯");

    // --| Authentication
    loggerChroma.group("Auth check", () => {
        const user = { id: 1, role: "admin", permissions: ["read", "write"] };
        loggerChroma.debug(user, "πŸ•΅οΈ", "User payload");

        loggerChroma.group("Token validation", () => {
            const token = { valid: true, expires: "2026-03-05T18:00:00Z" };
            loggerChroma.debug(token, "πŸ”‘", "Token info");
            loggerChroma.info("Token is valid", "βœ…");
        });

        loggerChroma.info("Authentication passed", "βœ…");
    });

    // --| Database query
    loggerChroma.group("DB query", () => {
        const users = [
            { id: 1, name: "Alice", active: true },
            { id: 2, name: "Bob", active: false },
            { id: 3, name: "Charlie", active: true },
        ];
        loggerChroma.debug(users, "πŸ—„οΈ", "Fetched users");

        loggerChroma.group("Filter active users", () => {
            const activeUsers = users.filter(u => u.active);
            loggerChroma.info(activeUsers, "🌟", "Active users list");
        });
    });

    loggerChroma.info("Request completed", "🎯");
});

// --| Another route example
loggerChroma.group("HTTP POST /orders", () => {
    loggerChroma.info("Request received", "πŸ“₯");

    loggerChroma.group("Auth check", () => {
        const user = { id: 2, role: "customer" };
        loggerChroma.debug(user, "πŸ•΅οΈ", "User payload");
        loggerChroma.info("Authentication passed", "βœ…");
    });

    loggerChroma.group("DB insert order", () => {
        const order = { id: 101, items: ["apple", "banana"], total: 12.5 };
        loggerChroma.debug(order, "πŸ›’", "Order object");

        loggerChroma.group("Send notification", () => {
            const notification = { to: "[email protected]", status: "sent" };
            loggerChroma.info(notification, "πŸ“§", "Notification sent");
        });
    });

    loggerChroma.info("Order processed successfully", "🎯");
});

// --| Error example
try {
    throw new Error("Something went horribly wrong!");
} catch (err) {
    loggerChroma.error(err, "πŸ¦„", "Critical error during request handling");
}

// --| Final server ready message
loggerChroma.info("Server ready to accept requests", "✨");

CommonJS (Random example)

const loggerChroma = require('logger-chroma');

loggerChroma.info('Server started successfully');
loggerChroma.warn('Low disk space', '⚠️');
loggerChroma.error('Failed to connect to database', new Error('Connection Timeout'));

// --| Logging objects (automatically pretty-printed via util.inspect)
const user = { id: 1, name: 'Gemini', roles: ['admin', 'ai'] };
loggerChroma.debug('Current user context:', user);

// --| Using the grouping feature
loggerChroma.group('Initialize Module', () => {
    loggerChroma.info('Loading configuration...');

    // --| Nested Group
    loggerChroma.group('Database Check', () => {
        loggerChroma.info('Connecting to PostgreSQL...', '🐘');
        loggerChroma.info('Connection established.');
    });

    loggerChroma.info('Module ready.');
});

// --| Overriding config on the fly
loggerChroma.config.timestampEnabled = false;
loggerChroma.info('This log has no timestamp');

TypeScript (Random example)

import loggerChroma from 'logger-chroma';

loggerChroma.info('Server started successfully');
loggerChroma.warn('Low disk space', '⚠️');
loggerChroma.error('Failed to connect to database', new Error('Connection Timeout'));

interface User {
    id: number;
    name: string;
    roles: string[];
}

const user: User = { id: 1, name: 'Gemini', roles: ['admin', 'ai'] };
loggerChroma.debug('Current user context:', user);

loggerChroma.group('Initialize Module', () => {
    loggerChroma.info('Loading configuration...');

    // --| Nested Grouping
    loggerChroma.group('Database Check', () => {
        loggerChroma.info('Connecting to PostgreSQL...', '🐘');
        loggerChroma.info('Connection established.');
    });

    loggerChroma.info('Module ready.');
});


if (loggerChroma.config) {
    loggerChroma.config.timestampEnabled = false;
    loggerChroma.info('This log has no timestamp');
}