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

logbucket

v1.1.0

Published

A small package to create awesome and beautiful logs in the node.js console with colors, prefixes and the ability to be saved in a debug file.

Downloads

7

Readme

discord version license stars

Logbucket

Logbucket is a lightweight and customizable logging library for Node.js featuring beautiful logs with configurable colors, prefixes and the ability to be saved to a debug file in real-time. If you're having trouble configuring the library, feel free to join our support server and we will help you further!

Installation using npm ⬇️

npm install logbucket

❤️ Sponsors

We're still searching for sponsors! Would you like to sponsor us?

📌 Features

  • ⚖️ Lightweight — Minimal footprint, maximum performance.
  • 🚨 Built with TypeScript — Enjoy full type safety and intelligent autocompletion.
  • ⭐️ Beautiful Logs — Quickly create clean, stylish, and readable logs.
  • ⚙️ Highly Customizable — Fine-tune styles, templates and more.
  • 📄 Custom Log Types — Define your own log categories and behaviors.
  • 🎨 Full RGB Color Support — Powered by ansis for vibrant, customizable colors.
  • 📝 Real-Time Log Saving — Automatically save all logs to a debug file as they happen.
  • 🎯 Event-Driven — Listen to events and define your own custom reactions.
  • 🧽 Automatic Cleaning — Automatically clear logs in the debug file to make sure it won't exceed a certain limit.

📸 Examples

🛠️ Quick Usage

TIP: Detailed examples are available in the ./examples/ directory in the Github repository.

const {LogBucket} = require("logbucket")
//import {LogBucket} from "logbucket"

//create a Logbucket instance
const log = LogBucket()

/////////////////////////
//// READY FOR USAGE ////
/////////////////////////

//try different log types
log("error","Hello world!")
log("warning","Hello world!")
log("info","Hello world!")

//try logging with parameters
log("debug","Hello world!",[
    {key:"lorem",value:"ipsum"},
    {key:"foo",value:"bar"}
])

//log an error to the console (e.g. from a try-catch)
log(new Error("This is an example error."))

🧩 API Reference

View full examples in Github Repository

function LogBucket(): LogBucketInstance

Parameters (Optional):

  • disableDefault? (boolean): Disable the built-in templates (to replace them with your own)
  • templates? (object): An object containing additional/custom templates (LBMessageTemplate)
  • errTemplate? (LBErrorTemplate): Add a custom template for logging JS errors (new Error(...))
  • debugFile? (LBDebugFile): Add a debug file to write all logs to. (Disabled by default)

function LogBucketInstance(): void

Parameters (Message):

  • type (string): The type to use for this message. Must be a custom or default registered type.
  • message (string): The message to log to the console.
  • params? (LBMessageParam[]): Add custom parameters to the message.
    • format: {key:string, value:string, hidden:boolean}

Parameters (Error):

  • error (Error): The error to log to the console.

Listen for events:

  • Use LogBucketInstance.on(eventName,callback) to listen for events.

class new LBMessageTemplate(): void

Constructor Parameters:

  • prefix (string): The prefix to use (uppercase recommended)
  • prefixColor (LBDefaultColor|LBHexColor): The color of the prefix.
  • msgColor (LBDefaultColor|LBHexColor): The color of the message.
  • paramsColor (LBDefaultColor|LBHexColor): The color of the parameters.

class new LBErrorTemplate()

Constructor Parameters:

  • titleColor (LBDefaultColor|LBHexColor): The color of the title.
  • descriptionColor (LBDefaultColor|LBHexColor): The color of the description.
  • title? (string): The title/prefix to use (uppercase recommended)
  • description? (string): An optional description to display below the error for additional information or bug reporting.

class new LBDebugFile()

Constructor Parameters:

  • path (string): The location of the debug file relative to the current directory. (process.cwd())
  • maxHistoryLength? (number): The maximum length of the debug file. It will start to scroll once the limit has been reached.
  • metadata? (LBDebugFileMetadata): Customise the metadata of the debug file. (top of file)

type LBDefaultColor

A collection of all available default colors:
white,red,orange,yellow,green,blue,gray,cyan,magenta,purple,pink

type LBDefaultType

A collection of all available log types/categories:
info,warning,error,system,database,debug,plugin,api,client,server

type LBHexColor

A utility type for hex-colors.

interface LBMessageParam

A parameter in the LogBucketInstance(type,message,params) method.

interface LBDebugFileMetadata

All settings for the debug file metadata.

🛠️ Contributors

All contributions are welcome! Feel free to create a pull-request or issue in the Github repository.

⭐️ Star History

Spread the beauty of clean logs — support our simple package by sharing it! 😁


v1.1.0 - README.md © 2025 - DJdj Development - Discord - Terms - Privacy Policy - Support Us - License