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

@xhubiotable/logger

v3.0.0

Published

**@tlink/logger**

Readme

@tlink/logger


Logger

This is a logger facade. It stores all the log entries in Memory. This is very useful for testing but not for production.

It has the following methods:

// Logs debug messages
debug(arg)

// Logs info messages
info(arg)

// Logs warning messages
warning(arg)

// Logs error messages
error(arg)

// Logs fatal messages
fatal(arg)

LoggerInterface

This is the interface each logger must implement to be used in xhaubiotable.

The following loglevels exists:

loglevel names and the level number

{
  debug: 0,
  info: 1,
  warning: 2,
  error: 3,
  fatal: 4,
}

Functions

/**
 * Clears all the existing log entries
 * Placeholder for the implementing loggers.
 */
async clear() {}

/**
 * Returns the logLevel as a number for a given level String.
 * If the level string is invalid, the level number for
 * error will be returned
 *
 * @param level {string} The loglevel as a string
 *
 * @return num {number} The loglevel as a number
 */
getLevelNumber(level) {}

/**
 * Returns the current date time as a timestamp string.
 * This time is added to the log entry
 * Format: 'yyyy-mm-dd hh:MM:ss'
 *
 * @return timeString {string} The timestamp
 */
getTime() {}

/**
 * Logs the given message.
 * @param message {string|object} The message/entry to be logged
 */
async debug(message) {}

async info(message) {}

async warning(message) {}

async error(message) {}

async fatal(message) {}

LoggerMemory

This logger is mainly used for unit testing. It stores all the logs in array by level type. So you can get the Logs after the test and proof that the right logs where generated.

Properties

writeConsole
When set to true, all the logs are also written to the console

Functions

All the functions from the LoggerInterface plus these functions.

/**
 * Clears all the existing log entries
 * Placeholder for the implementing loggers.
 */
async clear() {}

Retrieve the logs

To get all the logs read the property 'logger.entries'. This returns an hash where for each logLevel the logs are stored.

entries: {
  debug: [],
  info: [],
  warning: [],
  error: [],
  fatal: [],
}