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

chillogger

v1.0.107

Published

colorful formatted command line log printer

Readme

chillogger

A logger Util that:

  • Is colorful
  • Can trace where in the code log was written
  • Extendable transport
  • Extendable levels dictionary

Getting Started

npm install -s chillogger
//import chillogger
const Chillogger = require("chillogger");
//create an instance
const logger = new Chillogger()

//Usage option 1: using logger.log:
// logger.log("level", message, ...metaObjects)
logger.log("info", "i am a log message",{"key":value},"string", function);

//Usage option 2: using logger.[level name]:
// logger.info(message, ...metaObjects)
log.debug("info");

//Usage option 3, only for Error: using logger.error(error):
// will log error only if it is an object that has "message" on its.
log.error(new Error("this is an error"));

API

chilloger is configurable on 2 levels:

  • instance: Set the config on the chilloger instance
  • global: Set the defaults for any instance constructed from now on

Instance is created with:

new Logger([name][,options])

  • name {string|Boolen} add logger name; in the build in node-console transport this will be included in any line logged using the instance if true is passed, chillogger will generate an id for you
  • options {Object}
    • transport: {function[]} an array of functions that handles new log message, called by the instance with f(logMessage, loggerInstance) Default: built in node-console transport
    • levels: {Object} An object mapping log labels (for example "trace") to level (4) Default: see baseLevels.
    • level: {number} Max level to log Default: 3
    • trace: {boolean} Shows error stack trace, and enables time, and timeEnd, and chillogger's ability to trace log to file/line, Default: false.
    • verbosity: {number} built in console trasnport verbosity use 0, 1, or 1 Default: 0
  • Returns: loggerInstance

Some of these options are also configurable globally:

// set default trace
process.env.trace = 0
// or
Logger.setGlobalTrace(0)

// set default level
process.env.level = 4
  // or
Logger.setGlobalLevel(4)

// set defaul verbosity
process.env.verbosity = 2
  //or
Logger.setGlobalVerbosity(2)

chillogger instance

  • public methods
    • setLevel(level)
    • setTrace(trace)
    • setVerbosity(verbosity)
    • log(level, messageString, ...meta)
    • error(error)
    • time(label): time tracker that tells you where (file and line) timer started
    • timeEnd(label)

Also, all names of levels passed to the instance constructor as options, plus the build in levels are exposed using

log.bind(logger, levelName);

so if you have a level named "tellMommy" you can go

logger.tellMommy("everything",{mother: {knows: CONSTS.BEST}})`

Keep in mind that if your level name is reserved for chilloggers methods, it will not replace it.

baseLevels

The default levels map

 {
    fatal: 0,
    alert: 0,
    error: 1,
    warn: 2,
    info: 3,
    debug: 4,
    todo: 4,
    deprecated: 4,
    time: 5,
    trace: 5
  }

log message object

    {
      name, // logger instance name
      message, //string message
      meta, //an array of metadata objects;
      level, //log level
      levelLabel, //log level label
      ts: Date.now(), 
      src: { //src will be included only in case the instance is running with trace===true
        file, //file name
        line //line in code that called chillogger
      }
    }
  }