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

bunyan-debug-glob

v1.1.0

Published

Simple wrapper around the Bunyan logging library inspired by Debug

Readme

bunyan-debug-glob

Description

bunyan-debug-glob is a simple wrapper around the Bunyan logging library and inspired by the debug utility, adding the ability to set loggers levels through a given string (eg. process.env.LOG) using glob patterns. You can then change the level of any logger you use in your application with ease and modularity.

Install

npm install --save bunyan-debug-glob

Usage

Example

In your application:

// You don't really need to pass process.env.LOG as argument as this is the default. And, of course, you can use here
// any string variable you need.
const loggerFactory = require("bunyan-debug-glob")(process.env.LOG);

// Now use loggerFactory just like you would do with Bunyan

const httpLogger = loggerFactory.createLogger({"name": "my-app/http"});
const usersLogger = loggerFactory.createLogger({"name": "my-app/users"});

/* HTTP */
httpLogger.info("Info from HTTP logger");
httpLogger.error("Error from HTTP logger");

/* Users */
usersLogger.info("Info from users logger");

Now you can easily set your loggers level using the LOG environment variable:

# All loggers set to 'warn' level except 'app/http' set to 'debug'
LOG="**/*=warn;my-app/http=debug" node .

Levels

The levels string defines what log level should be set to the different loggers, using the following format: <log_name_pattern>=<log_level>[;<...>]

  • <log_name_pattern> is a glob pattern to match against loggers names.
  • <log_level> is the level to apply to loggers whose name matches the glob pattern. Levels are level names defined by Bunyan, to which we added the level none meaning no log should be output from the corresponding logger(s). An empty log level defaults to none. By default, the factory will use the LOG environment variable if it exists, or an empty string ("") if not (in which case all loggers will have their level set to "none").

Examples:

"**/*=warn" // All loggers levels set to `warn`
"**/*=warn;app/server=debug" // All loggers levels set to `warn` but logger `app/server` set to `debug`
"**/*=warn;app/**/*=debug" // All loggers levels set to `warn` but loggers whose name starts with `app/` set to debug
"**/*=warn;app/**/debug=debug" // All loggers levels set to `warn` but loggers whose name ends with `/debug` set to debug

License

MIT