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

node-log-cat

v1.5.1

Published

Comfortable and usefull logger tool for nodejs

Readme

What is node log cat?

This is a useful tool for recording logs on the console or keeping log in a file.

  • you can set custom color for each message type.
  • you can keep reports on your own file path.
  • you can filter logs in console by message type.
  • you can enable/disable print date on console.
  • you can check variable type.

Installation

npm i --save node-log-cat

how to use:

in nodejs:

Firs create a file like config.js:

in config.js:
const {LogHelper, Colors} = require('node-log-cat');

const config = {
        logPath: './Logs',     //This is directory path of log file. we create a daily file like YY-MM-DD.log in this path.
        showWarning: true,           // enable/disable print warning massges.
        showError: true,             // enable/disable print Error massges. 
        showDebug: true,             // enable/disable print Debug massges.
        showInfo: true,              // enable/disable print Info massges. 
        showSuccess: true,           // enable/disable print Success massges. 
        showTypof: true,             // enable/disable print variable type.
        printDate: true,             // if printDate be true add current date befor message
        warningColor: Colors.yellow, // set Warning message color here.
        infoColor: Colors.blue,      // set Info message color here.
        debugColor: Colors.cyan,     // set Debug message color here.
        errorColor: Colors.red,      // set Error message color here.   
        successColor: Colors.green,   // set Success message color here.
        typeofColor: Colors.gray     // set Type of variable color here.
}

const Log = new LogHelper(config);
module.exports = Log;

now require config file and use methods like this:

in index.js:
const Log = require('./config');

Log.w("This is a Warning message");
Log.i("This is a Info message");
Log.e("This is a Error message");
Log.s("This is a Success message");
Log.d("This is a Debug message");

output:

if you change printDate: false in config.js output be lik this:

output:

for keep logs in file:

in index.js
const Log = require('./config');
const {Type} = require('node-log-cat');

const message = 'In publishing and graphic design, Lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document or a typeface without relying on meaningful content. Lorem ipsum may be used as a placeholder before the final copy is available.';

Log.keep(message, Type.ERROR);
Log.keep(message, Type.INFO);
Log.keep(message, Type.SUCCESS);
Log.keep(message, Type.DEBUG);
Log.keep(message, Type.WARNING);

output:

in LogCat.log

ERROR	2022-2-29 18:26:51-> In publishing and graphic design, Lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document or a typeface without relying on meaningful content. Lorem ipsum may be used as a placeholder before the final copy is available.

INFO	2022-2-29 18:26:51-> In publishing and graphic design, Lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document or a typeface without relying on meaningful content. Lorem ipsum may be used as a placeholder before the final copy is available.

SUCCESS	2022-2-29 18:26:51-> In publishing and graphic design, Lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document or a typeface without relying on meaningful content. Lorem ipsum may be used as a placeholder before the final copy is available.

DEBUG	2022-2-29 18:26:51-> In publishing and graphic design, Lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document or a typeface without relying on meaningful content. Lorem ipsum may be used as a placeholder before the final copy is available.

WARNING	2022-2-29 18:26:51-> In publishing and graphic design, Lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document or a typeface without relying on meaningful content. Lorem ipsum may be used as a placeholder before the final copy is available.

for print type of variable:

in index.js
const Log = require('./config');

let my_var = {
        foo: "bar"
}
Log.t(my_var);

output

2022-3-2 20:7:47-> object