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

logware

v1.0.2

Published

Easy, flexible and clear Express middleware logging

Readme

logware

Simple, flexible and unobtrusive console-logging middleware for Express. Will look great in your devDependencies.

Why?

Because you want to see the journey your req and res objects are taking once your route is hit, or you just want to log something to prove things are going where you expect.

Why... this?

Because you want your logging to be

  • colourful
  • clearly demarcated and easy to read
  • numbered, so you can easily tell which is which
  • easy to add, with no need to type something hideous and then find the app has crashed because of a missing bracket or comma
  • ERROR FREE. This library is unlikely ever to throw an error. Nobody wants that from console logging.

It's also free from dependencies.

How?

import lw from 'logware';

app.post('/route',
  middleware1,
  lw({ req: 'body.data.thing' }), // tell logware what to log
  middleware2,
  lw({ req: 'user', res: ['app.data', 'locals.thing']}), // you can use an array to log multiple things
  middleware3,
  lw('Hello!!!'), // or just pass a message
  middleware4,
  lw({ message: 'Hello', req: 'body', res: ['app.data', 'locals.thing']}), // or do it all!
  middleware5
);

Logs look like this

╔══
║ 1. hello



  req.prop
  ───────
  'foo bar'



  res.locals.data.thing
  ──────────────────
  'bar foo'

// some log from your real middleware

╔══
║ 2. another log



  req.number
  ─────────
  8.988784079044443

Also

You can tell logware to log a certain message or certain properties every time using the options object, which works exactly the same way as the object you would pass to lw():

lw.options = {
  message: 'This will be logged every time',
  req: 'params.thingToLogEveryTime',
  res: 'headersSent'
};

// these things will be logged each time lw() is used, along with anything passed in

Yes...

This middleware does add a tiny _logwareCounter property to the response's locals object. It's hard to see how this could affect your app at all though (especially as you shouldn't be using this library anywhere but locally) unless you really want it to, in which case more power to you.