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 🙏

© 2024 – Pkg Stats / Ryan Hefner

log-in-line

v1.0.13

Published

Used to locate the LOG that is printed for a request. When filtering the logs, **LOG:XXX** can be used to locate the LOG of a request.

Downloads

3

Readme

Introduce

Used to locate the LOG that is printed for a request. When filtering the logs, LOG:XXX can be used to locate the LOG of a request.

You can also set the LOG seqno by using the setseqno('abcdefg') function or passing it in when creating a new object, such as new LOG('123456').

Usage

Refer to the following code in the file in use:

const LOG = require('log-in-line');

Add the following code at the beginning of each request:

let log1 = new LOG(); // new an object

Example

const LOG = require('log-in-line');
let log1 = new LOG(); // new an object
log1.LV2('log1 start here!');
log1.setlevel(8); // set the level of the log1
log1.LV1('setlevel 8');
log1.LV5('log1 test1');
log1.ERR('log1 err1');
log1.setlevel(5);
log1.LV1('setlevel 5');
log1.LV5('log1 test2');
log1.ERR('log1 err2');
log1.setlevel(4);
log1.LV1('setlevel 4');
log1.LV5('log1 test3'); // this will not print because of the level(4) is less than 5
log1.ERR('log1 err3');
log1.LV2('log1 end here!'); 

let log2 = new LOG(); 
// let log2 = new LOG(123123); // You can specify a running number
log2.LV2('log2 start here!');
log2.setlevel(8);
log2.LV1('setlevel 8');
log2.LV5('log2 test1');
log2.ERR('log2 err1');
log2.setlevel(5);
log2.LV1('setlevel 5');
log2.LV5('log2 test2');
log2.ERR('log2 err2');
log2.setlevel(4);
log2.LV1('setlevel 4');
log2.LV5('log2 test3'); // this will not print because of the level(4) is less than 5
log2.ERR('log2 err3');

log2.setlevel(0);
log2.LV1('setlevel 4');// this will not print because of the level(1) is less than 0
log2.ERR('log2 err4'); // this will print
log2.setlevel(3);
log2.LV2('log2 end here!');

Code execution results:

Use LOG:AIY9K1584758645877 to filter request that print logs using log1

Use LOG:39GB81584758645889 to filter request that print logs using log2

2020-03-21 10:44:05.878|L2|P0-1|LOG:AIY9K1584758645877|example.js|4|log start here!
2020-03-21 10:44:05.887|L1|P0-1|LOG:AIY9K1584758645877|example.js|6|setlevel 8
2020-03-21 10:44:05.888|L5|P0-1|LOG:AIY9K1584758645877|example.js|7|log test1
2020-03-21 10:44:05.888|LE|P0-1|LOG:AIY9K1584758645877|example.js|8|log err1
2020-03-21 10:44:05.888|L1|P0-1|LOG:AIY9K1584758645877|example.js|10|setlevel 5
2020-03-21 10:44:05.888|L5|P0-1|LOG:AIY9K1584758645877|example.js|11|log test2
2020-03-21 10:44:05.889|LE|P0-1|LOG:AIY9K1584758645877|example.js|12|log err2
2020-03-21 10:44:05.889|L1|P0-1|LOG:AIY9K1584758645877|example.js|14|setlevel 4
2020-03-21 10:44:05.889|LE|P0-1|LOG:AIY9K1584758645877|example.js|16|log err3
2020-03-21 10:44:05.889|L2|P0-1|LOG:AIY9K1584758645877|example.js|17|log end here!
2020-03-21 10:44:05.889|L2|P0-1|LOG:39GB81584758645889|example.js|22|log start here!
2020-03-21 10:44:05.889|L1|P0-1|LOG:39GB81584758645889|example.js|24|setlevel 8
2020-03-21 10:44:05.889|L5|P0-1|LOG:39GB81584758645889|example.js|25|log test1
2020-03-21 10:44:05.889|LE|P0-1|LOG:39GB81584758645889|example.js|26|log err1
2020-03-21 10:44:05.889|L1|P0-1|LOG:39GB81584758645889|example.js|28|setlevel 5
2020-03-21 10:44:05.890|L5|P0-1|LOG:39GB81584758645889|example.js|29|log test2
2020-03-21 10:44:05.890|LE|P0-1|LOG:39GB81584758645889|example.js|30|log err2
2020-03-21 10:44:05.890|L1|P0-1|LOG:39GB81584758645889|example.js|32|setlevel 4
2020-03-21 10:44:05.890|LE|P0-1|LOG:39GB81584758645889|example.js|34|log err3
2020-03-21 10:44:05.892|L1|P0-1|LOG:39GB81584758645889|example.js|37|setlevel 4
2020-03-21 10:44:05.892|LE|P0-1|LOG:39GB81584758645889|example.js|38|log err4
2020-03-21 10:44:05.893|L2|P0-1|LOG:39GB81584758645889|example.js|41|log end here!

Versions

version| update ---- | ------
1.0.0 | Release 1.0.7 | Published README.md instructions

Express gratitude

Thank you for your support and I hope it was useful.