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

slick-log

v1.0.6

Published

A powerful and flexible logging utility for Node.js applications

Readme

slick-log

A simple, yet flexible & powerful logging utility for Node.js applications with beautiful console output and file logging capabilities.

Features

  • Beautiful colored console output with decorative borders for errors
  • File logging disabled by default - only console logging until explicitly enabled
  • File logging with automatic rotation
  • Separate error log file
  • Configurable log levels
  • Timestamp formatting
  • Log file size management
  • Automatic log rotation
  • TypeScript support
  • Easy enable/disable file logging control

Installation

npm install slick-log

Quick Start

import { Logger, LogLevel } from 'slick-log';

// Console logging only (default behavior)
Logger.info('This only goes to console');
Logger.success('Success message');
Logger.error('Error with decorative border');

// Optional: Set log level (defaults to INFO)
Logger.setLogLevel(LogLevel.DEBUG);

// Optional: Enable file logging
Logger.setLogFiles('./logs/app.log', './logs/error.log');
Logger.info('This goes to both console and files');

// Optional: Disable file logging again
Logger.disableFileLogging();
Logger.info('Back to console only');

Log Levels

The logger supports the following log levels (in order of severity):

  • DEBUG (DEBG) - Detailed debugging information
  • INFO (INFO) - General information about program execution
  • SUCCESS (SUCC) - Successful operations
  • WARN (WARN) - Warning messages
  • ERROR (EROR) - Error messages
  • FATAL (FATL) - Fatal errors that may lead to program termination

Configuration

Log Level

import { Logger, LogLevel } from 'slick-log';

// Set minimum log level
Logger.setLogLevel(LogLevel.DEBUG);

// Get current log level
const currentLevel = Logger.getLogLevel();

File Logging Control

import { Logger } from 'slick-log';

// Check if file logging is enabled (false by default)
const isEnabled = Logger.isFileLoggingEnabled();

// Enable file logging
Logger.setLogFiles('./logs/app.log', './logs/error.log');

// Disable file logging (console logging continues)
Logger.disableFileLogging();

// Configure file size (default: 100MB)
Logger.setMaxFileSize(50); // 50MB

// Configure number of rotated files (default: 5)
Logger.setMaxRotatedFiles(3);

// Wait for all pending file writes to complete
await Logger.waitForWrites();

Output Format

Console Output

The logger provides beautiful, color-coded console output with centered log level labels:

  • DEBUG: Gray background with white text
  • INFO: Blue background with white text
  • SUCCESS: Green background with black text
  • WARN: Yellow background with black text
  • ERROR: Red background with white text + decorative borders
  • FATAL: Bright red background with white text + decorative borders

File Output

Log files contain entries in the following format:

YYYY-MM-DD HH:mm:ss [LEVEL] Message

Default Behavior

  • Console logging: Always enabled
  • File logging: Disabled by default - only starts when you call setLogFiles()
  • Log level: INFO (logs INFO, SUCCESS, WARN, ERROR, FATAL)
  • File rotation: 100MB max size, keeps 5 rotated files

TypeScript Support

This package is written in TypeScript and includes type definitions.

License

ISC