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

jlogger

v1.3.3

Published

A simple logger inspired by Android LogCat for NodeJS.

Readme

Android Log Cat Inspired Logger for NodeJS

Latest Stable Version License NPM Downloads NPM Downloads

NPM

##Installation

$ npm install --save jlogger

A simple logger inspired by Android LogCat for NodeJS. This logger provides functions like Log.e(), Log.w(), Log.i() and Log.d() as in Android App Development. The display is as

Source code for screenshot Screenshot

**Note: Known issues when running with forever.js. Run with --colors if colors are not showing. **

##Usage

var Log = require('jlogger');

Log.addGlobalConfig("defaultTag", "defaultTag");  //Default tag for every log

var TAG = "some TAG";

Log.e(TAG, "your msg"); //This msg will be in red
Log.error(TAG, "your msg"); //This msg will be in red

Log.w(TAG, "msg"); //In yellow
Log.warn(TAG, "msg"); //In yellow

Log.i(TAG, "msg"); //In green
Log.info(TAG, "msg"); //In green

Log.d(TAG, "msg"); //This is white

Log.d("blue", TAG, "msg"); //Specify color
Log.debug(color, TAG, "msg"); //Specify color. Default is white

Log.hr(length);  //Draw a dashed horizontal line. Default length is that of the terminal

If you want a new instance of the Logger, having different properties from global config use:

var Log = require('jlogger');
var Log2 = new Log.Logger({"defaultTag": "another default tag"});

Log2.e(TAG, "Another instance of logger");
// or
Log.e("Msg with default TAG");

Available customisations

Log.setGlobalConfig({
  "defaultTag": "<your default tag name>",  //Default tag for when tag is not specified
  "tagBold": <true/false>,  //If true then tags will be in bold,
  "hrLength": <length of hr>,   //Default length of horizontal line. If not specified then it fits to terminal size
  "hrChar": "=",  //Draw horizontal line with specified character. Default is "-"
  "adaptScreenSize": <true/false>, //If true then hr width will fit the current terminal size
  "projectName": "<your project name>",  //Display this in your log
  "showProjectName": <true/false>,  //If false then project name is not printing in log. Default is true
});

Using Log.hr()

Log.hr(length, showTimestamp, color, tag, char);

length: Number Number of characters to draw. Default is set by global Config showTimeStamp: true/false Whether to show timestamp. Default is false color: color name Color for the horizontal line tag: tag tag for hr char: "=" String with which the hr is to be drawn. (tag parameter should be present, atleast an empty placeholder)

###Sections You can create a section in your terminal by using Log.section().

//color : The color of section divider. Default is blue
//msg: message to be inserted in center of line
//char: character to draw section divider with
Log.section(color, msg, char);

###JSON formatting No need to stringify the json to display. The module displays it with correct indentation.

var obj = {
   name: "Jibin Mathews",
   email: "[email protected]"
};

Log.e(TAG, obj);
or
Log.d("blue", TAG, obj);

##Release Notes

  1. Release 1.3.0
    • Added Sectioning
  2. Release 1.2.0
    • Added JSON formatting
    • Text wrapping (Changed from character based wrapping to word based wrapping)
    • Bug fix with setting config
  3. Release 1.1.0
    • Added horizontal rule
  4. Release 1.0.0
    • Initial Release