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

raj-logger

v1.0.1

Published

A colorful Node.js logger with emojis, timestamps, and pretty printing

Readme

raj-logger

A colorful Node.js logger with emojis, timestamps, pretty-printed JSON, and optional boxed output for enhanced terminal readability.


✨ Features

  • 🎨 Colorful console logs with different styles per log level
  • 😄 Emojis for quick visual recognition of log types
  • ISO-like timestamps on each log line
  • 📜 Pretty print for objects and arrays with indentation
  • 📦 Optional boxed output around JSON or text for emphasis
  • 🌐 Global functions available everywhere (info(), err(), succ(), dbg(), etc.)
  • Zero dependencies — pure Node.js, no external packages

📦 Installation

npm install raj-logger


🚀 Usage

Require once to enable global log functions:

require("raj-logger");

Available functions:

| Function | Description | Emoji | Color | |------------|-----------------------------|-------|------------------| | info() | Informational messages | ℹ️ | Blue | | dbg() | Debugging details | 🐞 | Cyan (dimmed) | | warn() | Warnings | ⚠️ | Yellow | | fatal() | Fatal errors | 💀 | Bold Red | | succ() | Success messages | ✅ | Green | | err() | Error messages | ❌ | Red | | load() | Loading indicators | ⏳ | Magenta (dimmed) | | done() | Completed tasks | 🎯 | Bold Green | | upd() | Updates / Refreshes | 🔄 | Cyan | | event() | Special events | 🎉 | Magenta | | net() | Network-related logs | 🌐 | Blue | | sec() | Security alerts | 🔒 | Yellow/Magenta |


💡 Examples

Basic logging

info("Starting server..."); succ("Server started successfully"); warn("Memory usage high"); err("Failed to connect to database"); dbg({ user: "raj", status: "active" });


Logging with boxed output

dbg({ user: "raj", status: "active" }, { box: true }); err("Critical failure!", { box: true });


Logging arrays or complex objects

dbg(["apple", "banana", "cherry"], { box: true }); info({ server: "localhost", port: 3000, ssl: false });


Using in a real app

require("raj-logger");

succ("Application started"); warn("Deprecated API usage detected"); err("Unhandled exception"); load("Loading data from API..."); done("Data loaded successfully");


⚙️ How it Works

  • Adds a timestamp and tag [raj-log] to each message
  • Each log type has a unique emoji and color style
  • If the message is an object or array, it is pretty-printed with indentation
  • Optionally wraps the output in a neat ASCII box
  • Registers global functions so you can call them anywhere without imports

🤝 Contributing

Pull requests and suggestions are welcome!


📜 License

MIT © Rajvardhan


👨‍💻 Contact

Created by RajvardhanGitHub


Enjoy colorful, fun logging in your Node.js apps! 🎉