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

express-logio

v1.0.52

Published

simple realtime log monitoring (standalone) as express middleware #log.io #winston3

Downloads

14

Readme

Thanks to the nifty standalone log.io package you can easily view events (which should not be sent to internet)

Usage

app.use( require('express-logio')({
  app,
  url:'/log',
  winston: require('winston'),
  port:6689,
  webport:6688,
  node_name: 'backend',
  host: '0.0.0.0',
  forwardConsole:true
}))

// output to log.io 'backend' stream
console.log("hello default")
// output to log.io 'mystream' stream
console.log("this is a test",{steam:"mystream"})

Now surf to http://localhost:6688

cpu, memory and http-requests are logged automatically. The difference between port 6689 and 6688 can be read in the log.io docs

NOTE 1: set environment variable DEBUG=1 to monitor connection errors

NOTE 2: Parse-server users: see parse-server section below

Install

npm install express-logio log.io winston --save

NOTE: leave out winston if you're already using it in your express app

Options

{
  app: app,                    // the express app
  url:'/log',                  // where to access the log.io web interface
  winston: require('winston')  // your winston logger
  port:6689,                   // default log.io port
  webport:6688,                // default log.io webserverport
  node_name: 'backend',        // default name
  host: '127.0.0.1',           // host ip
  forwardConsole:true          // forwards console.log e.g. to log.io
}

Parse-server

Pass the parse logger like this:

var {logger} = require('parse-server')

app.use( require('express-logio')({
  winston: logger.adapter,
  ...
}))

FAQ

  • where are the logfile(s)?

There aren't. Check the log.io docs to add logfiles as well.

  • how do I search logfiles?

check https://stackoverflow.com/questions/35776646/how-do-i-see-logs-on-parse-server