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

@yukiakai/logger

v1.1.1

Published

A lightweight static logger for Node.js using native `console.log` but with log levels and `debug`-style control.

Readme

@yukiakai/logger

NPM Version NPM Downloads

Build Status codecov

A lightweight static logger for Node.js using native console.log but with log levels and debug-style control. Zero dependencies.

Human-friendly output.
Keep Node's beautiful console formatting, but control level like pino or debug.


Features

  • Uses Node.js native console, keeps util.inspect formatting (colors, depth, etc.)
  • Support debug, info, warn, error, fatal, silent
  • Static & global, no instance needed.
  • Control log level via process.env.LOG_LEVEL or code.
  • Filter logs by caller file path via Logger.path.
  • No dependencies. Zero overhead.

Install

npm i @yukiakai/logger

Usage

ESM (TS)

import { Logger } from '@yukiakai/logger';

// Set level once (global, static)
Logger.level = process.env.LOG_LEVEL as any || 'info';

// Custom filter log path
Logger.path = './src/';

Logger.info('Server started', { port: 3000 });
Logger.debug('Debug data', { foo: 123, bar: 456 });
Logger.warn('Warning', 'some detail');
Logger.error('Something failed', new Error('Oops'));

CJS

const { Logger } = require('@yukiakai/logger');

// Set level once (global, static)
Logger.level = process.env.LOG_LEVEL || 'info';

// Custom filter log path
Logger.path = './src/';

Logger.info('Server started', { port: 3000 });
Logger.debug('Debug data', { foo: 123, bar: 456 });
Logger.warn('Warning', 'some detail');
Logger.error('Something failed', new Error('Oops'));

Output example:

[INFO] Server started { port: 3000 }

[DEBUG] Debug data {
  foo: 123,
  bar: 456
}

[WARN] Warning some detail

[ERROR] Something failed Error: Oops
    at ...

Why?

  • You don’t want to delete console.log everywhere when done debugging.
  • You love Node’s console.log(a, b, c) style (no JSON lines, no forced format).
  • You want debug-style control, but for structured console output.
  • No external packages. No bloat.

Log Levels

| Level | Logs | |----------|----------------| | fatal | Fatal only | | error | Error + Fatal | | warn | Warn + Error | | info | Info + Warn + Error | | debug | All logs | | silent| Nothing |

Set via:

LOG_LEVEL=debug node app.js

Or in code:

Logger.level = 'warn';

Log Path

You can configure the logger to only log messages when called from specific files by setting the Logger.path option.

Set via code

Logger.path = './src/';

Default behavior

If Logger.path is not set, the logger will log from all files under the current working directory (process.cwd()), excluding any files inside node_modules/.


API

| Method | Description | |---------|-------------| | Logger.debug(...args) | Debug logs | | Logger.info(...args) | Info logs | | Logger.warn(...args) | Warn logs | | Logger.error(...args) | Error logs | | Logger.fatal(...args) | Fatal logs |

All methods accept console.log style arguments:
log(a, b, c, {d: 1})


Changelog

See full release notes in CHANGELOG.md


License

MIT © Yuki