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

logginlys

v4.0.2

Published

📦️ A lightweight, high-performance TypeScript logger with automatic environment detection for consistent ANSI and CSS styling in Node.js and Browser.

Readme

  • node >= 22.17.0
  • bun >= 1.1.0
bun i -D logginlys
npm i -D logginlys
pnpm i -D logginlys
yarn i -D logginlys

General use is as simple as importing the log object and calling its methods:

import { log } from 'logginlys';

log.info('This is an info message');
log.success('This is a success message');
log.error('This is an error message');
log.warning('This is a warning message');
log.debug('This is a debug message');
log.log('This is a log message');
log.blank();
log.setup('This is a setup message');
log.http({
  url: 'https://example.com/api/data?query=123',
  method: 'GET',
  status: 200,
  time: 150
});
log.httpError('This is a HTTP error message', {
  url: 'https://example.com/api/data?query=123',
  method: 'POST',
  status: 500,
  time: 300
});

The result will be this:

You can customize the logger by passing an options object to the Logger class constructor or to each log method. The options object can have the following properties:

  • prefix (string): A custom prefix to be added before each log message.
  • isDev (boolean): A flag to enable or disable logging. If set to false, all log methods will be no-ops.
  • showTimestamp (boolean): A flag to enable or disable timestamps in log messages.
  • showBadge (boolean): A flag to enable or disable badges in log messages.
  • blankAbove (boolean): A flag to add a blank line above the log message.
  • blankBelow (boolean): A flag to add a blank line below the log message.
  • icon (string): A custom icon to be displayed before the log message (only for ansi).
  • emoji (string): A custom emoji to be displayed before the log message (only for browser).

Log level specific styles

  • log, info, http, debug, error, setup, warning, success (object): Objects to customize styles for specific log levels, with the same properties as above.
  • http (object): An object to customize styles for HTTP logs, with the same properties as above.
  • httpError (object): An object to customize styles for HTTP error logs, with the same properties as above.
  • box (object): An object to customize styles for box logs, with the same properties as above.
  • loader (object): An object to customize styles for loader logs, with the same properties as above.

To customize the logger globally, you can do the following:

import { LogManager } from 'logginlys';

const logger = new LogManager({
  prefix: '[My App]',
  isDev: true,
  showTimestamp: true,
  blankAbove: false,
  blankBelow: false
});

logger.info('This is an info message');
logger.setup('This is a setup message');

In case you want to customize one log message you can do the following:

import { LogManager } from 'logginlys';

const log = new LogManager();

log.info('This is an info message with custom styles', {
  prefix: '[Custom Prefix]',
  showTimestamp: false,
});
log.success('This is a success message', { blankAbove: true });

To log box messages, you can use the log.box method:

import { LogManager } from 'logginlys';

const log = new LogManager();

log.box('Box message');

log.box('Box message', {
  blankAbove: true,
  blankBelow: true,
  boxStyle: 'bold',
  width: 40,
  height: 7,
  ansi: {
    color: colorAnsi.green,
    borderColor: colorAnsi.blue
  },
  css: {
    color: colorCss.green,
    borderColor: colorCss.blue,
    bgColor: colorCss.bgBlack,
    padding: '10px 15px'
  }
});

Resulting in this:

To use loader logs, you can use the log.loader method:

const loader = logger.loader({
  message: 'Loading...',
  position: 'left',
  color: colorAnsi.cyan,
});

loader.start();
loader.stop('Finished loading!', icon.check);

You have the option to customize the loader message, position and color. You can also use different icons to indicate the status of the loader.

  • message (string): The message to be displayed next to the loader.
  • position (string): The position of the loader, can be 'left', 'right' or 'center'.
  • color (string): The color of the loader, can be any valid ANSI color code for terminal or any valid CSS color for browser.
  • showTimestamp (boolean): A flag to enable or disable timestamps in loader messages.
  • type (string): The type of the loader animation, can be 'line', 'dots', 'bounce' or 'circle', 'aesthetic', 'binary' or 'grow'.

Column logs are also available using the loggerColumn method:

logger.info(`Column example:\n\n${loggerColumn(columnMessage, { width: 80, padding: 4 })}`);

Resulting in this:

Custom style text can be created using the loggerStyle method:

// Ansi example
logger.info(loggerStyle.ansi('Styled message', {
  bold: true,
  color: colorAnsi.blue,
  bg: colorAnsi.bgYellow
}));

// CSS example
logger.info(loggerStyle.css('Styled message', {
  color: colorCss.blue,
  'background-color': colorCss.bgYellow, 
  padding: '5px 10px',
  'border-radius': '5px'
}));

Resulting in this:

In case you want to create your own custom log method, you can extend the LogManager class and add your custom method:

class MyCustomLogger extends LogManager {
  typescript(message: string, options?: LoggerStyleParameters) {
    const tsStyle: LoggerStyleParameters = {
      ansi: { color: '\u001b[36m' },
      showBadge: false,
      emoji: '🟦',
      icon: 'TS'
    };
    
    this.custom(message, { ...options, ...tsStyle });
  }
}

const log = new MyCustomLogger();
log.typescript('This is a custom TypeScript log message');