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 🙏

© 2025 – Pkg Stats / Ryan Hefner

logmoon

v1.7.2

Published

HTTP log monitoring console program

Readme

LogMoon Logo

Dependencies Status DevDependencies Status Coverage Status Build Status

LogMoon

LogMoon is real-time HTTP log monitoring CLI. It will display access stats in a determined frequency and alert you if a chosen access limit is reached in 2 minutes.

Installation

You can install LogMoon as a global NPM package by running

npm i -g logmoon

Or by cloning this repository and running

npm install

LogMoon will be installed and will be available globally in your terminal.

Configuration

LogMoon has 4 configurations that can be changed via environment variables (instructions: Windows | Unix) or via the creation of a .env file based on the .env.example:

1. STATS_DISPLAY_INTERVAL (seconds)

The interval to display access information (TODO).

Default value is 10. (Access information is displayed every 10 seconds);

2. REQUESTS_PER_SECOND_ALARM (requests per second)

The number of requests per second threshold witch will display an alert when reached.

Default value is 10. (Alert is displayed if 10 or more requests per second are made in the past LOGMOON_ALARM_PERIOD seconds).

3. LOGMOON_ALARM_PERIOD (seconds period)

The period where the alarm of requests per second will be tested and active.

Default value is 120. (Alert is displayed if REQUESTS_PER_SECOND_ALARM or more requests per second are made in the past 2 minutes).

3. LOG_FILE (file location)

The location of the W3C-formatted HTTP access log.

Default value is /tmp/access.log. (The location from where the log file will be consumed in real-time).

4. LOGMOON_OUTPUT_LOCATION (file location)

The location of the output file. If empty, or not present, LogMoon will not log to file, only to the terminal window

Usage

In order to use LogMoon, you can execute the following on the terminal:

logmoon

Or, if you cloned the repo, run

npm start

LogMoon should start running and displaying the information from your server log file.

Development

To install locally and be able to contribute, clone this repo and save a copy of .env.example as .env.

To execute the application:

npm start

To run the tests:

npm test

To generate the documentation:

npm run doc

Future improvements

  • [ ] Find a less memory consuming solution for the alarm (maybe based on the average requests instead of an array)
  • [ ] Make the REQUESTS_PER_SECOND_ALARM variable according to the log frequency
  • [ ] Display an alert in a permanent position in the screen
  • [ ] Create other alerts, for instance for any status 50x or a certain amount of status 40x in a period of time
  • [ ] Handle several logs
  • [ ] Create a browser output
  • [ ] Create an Electron app
  • [ ] Sending push notifications (PushMe solution, for instance)