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

@nyx-labs/logger

v1.0.3

Published

<h1><img align="left" width="48px" height:"48px" src="https://github.com/NyxxLabs/.github/blob/main/img/icon.png"> @nyx-labs/logger</h1>

Readme

npm version License: MIT

An NPM module offering greater flexibility for managing your logs.

Example

const { logger } = require('@nyx-labs/logger');

logger.info("Information");
logger.warn("Warning");
logger.success("Success");
logger.error("Error");
logger.debug("Debug message");

What is returned:

[THU-OCT-15][12:32:22][INFO] Information
[THU-OCT-15][12:32:22][WARN] Warning
[THU-OCT-15][12:32:22][SUCCESS] Success
[THU-OCT-15][12:32:22][ERROR] Error
[THU-OCT-15][12:32:22][DEBUG] Debug message

Change parameters

You can modify the module settings as follows:

const { Logger } = require('@nyx-labs/logger');
const logger = new Logger({
    debug: false,
    showTime: false,
    showDate: false,
    logFile: "./optionnal", // If there is a log file, all logs will be recorded in it.
})

What is returned when using the same code with different parameters:

[INFO] Information
[WARN] Warning
[SUCCESS] Success
[ERROR] Error

Additional functions

logger.clearLog()

If in your module parameters there is a log file, then the file will be deleted. It can be used to reset your log file by using logger.clearLog() when you start your program, and then the next logs will create a new log file.

logger.timer("label") and logger.timerEnd("label")

You want to know the time between the start of an instruction and the end? Use the logger.timer() and logger.timerEnd() functions.

const { logger } = require('@nyx-labs/logger');

logger.timer("example");
logger.info("Information");
logger.warn("Warning");
logger.success("Success");
logger.error("Error");
logger.debug("Debug message");
logger.timerEnd("example");

What is returned:

[THU-OCT-15][12:44:20][INFO] Information
[THU-OCT-15][12:44:20][WARN] Warning
[THU-OCT-15][12:44:20][SUCCESS] Success
[THU-OCT-15][12:44:20][ERROR] Error
[THU-OCT-15][12:44:20][DEBUG] Debug message
[THU-OCT-15][12:44:20][TIME] example: 8.66ms

logger.child("child_name")

You can create some children for your logger. Here is an example:

const { Logger } = require('@nyx-labs/logger');
const logger = new Logger({ showDate: false })
logger.info("No child");

const dbLogger = logger.child("DB");
dbLogger.info("DB child");

const dbTestLogger = dbLogger.child("TEST");
dbTestLogger.info("DB:TEST child");

// You can create as many children as you want.

What is returned:

[12:49:46][INFO] No child
[12:49:46][INFO][DB] DB child
[12:49:46][INFO][DB:TEST] DB:TEST child

Our Discord