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

loxer

v2.0.0

Published

Logger, Tracer, Error detector, dataflow visualizer

Downloads

21

Readme

Loxer_Logo

Loxer GitHub release (latest by date) GitHub Release Date GitHub branch checks state npm bundle size GitHub

Loxer is a middleware logger that allows you to:

  • distribute logs to different output streams (dev / prod / log / error)
  • add levels to logs
  • categorize logs in modules (with their own levels)
  • connect logs to each other to "boxes"
  • improve error logs (with more information)
  • get significantly better visualization of the logs
  • visualize the data flow (including time measurement)
  • full Typescript support
  • rich output of values (items) for debugging purposes

With Loxer, logs never have to be deleted again, as they hardly use any resources when switched off. Logs and error records can easily be forwarded to crash reporting systems such as Firebase. This makes it possible to get error reports that are just as good in the production environment as in the development environment. Furthermore, errors in concurrent functional processes can be detected more easily.

Documentation

The API Reference provides a complete overview of all the features of the package. Furthermore, the complete source code is documented with js-doc and typed with typscript, which guarantees full IDE support.

The Documentation contains detailed instructions on how to use the package.

The Performance Tests documents how small the influence of the package is on the performance of an application.

Usage

Write logs in an intuitive way:

// initialize it somewhere (once) -> singleton
Loxer.init();

// simple log
Loxer.log('my message');

// error log
Loxer.error('something bad happened');

// highlight logs
Loxer.highlight().log('my message');

// set levels
Loxer.level(2).log('not that necessary log');

// set modules
Loxer.module('AUTH').log('user logged in');

// use boxes
const lox = Loxer.open('opening log');
Loxer.of(lox).add('appended log');
Loxer.of(lox).error('appended error');
Loxer.of(lox).close('closing log');

// combine everything like you want
Loxer.module('AUTH').level(3).highlight().log('highlighted level 3 log for module Authentication');

// use shortcuts for the methods
const lox2 = Loxer.l(1).h().m('AUTH').open('highlighted level 1 log for module Authentication');

For a complete guide on how to use everything, definitely take a look at the Documentation

Preview Example

Consider the following log output (without the log date):

plain_console

As you can see the logs might tell something considering you know where they come from and what they do, but obviously they seem to be pretty uninformative.

Let's see what Loxer can do about this:

plain_console

The log messages are exactly the same, but with a litte configuration you can see what is happening in the application. Even if you are not familiar with the code you can follow the implemented data flow by just one sight.

Watch this comparison with a slider

Installation

npm i --save loxer or yarn add loxer thats it.

Deps

just color