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

@sherlog/cli

v0.0.22

Published

In-Memory observability for service logs

Downloads

5

Readme

@sherlog/cli

Unified logs as stream.

Sherlog CLI is bundled with Prisma. Feel free to consume the stream with any other tool or programming language of your preference.

Demo: https://sherlog.sh

Installation

OS X & Linux node >= v10.15.0:

npm install -g @sherlog/cli

Usage

You can use the --help option to get more details about options and commands

Usage: sherlog [options] [command]

Options:
  -v, --version    print version
  -h, --help       display help for command

Commands:
  init [options]   initializes the project
  test [options]   validate your config schema
  start [options]  start the server
  help [command]   display help for command

Getting started

The following command will initialize your project and create a basic .sherlog config file.

sherlog init
{
  "hostname": "",
  "files": [
    {
      "metric": "",
      "file": "",
      "timezone": ""
    }
  ]
}

Config parameters

  • hostname: default to your server hostname.
  • backpressure: the interval in milliseconds between each websocket message sent (default: 1000).
  • chunks: max items stored in buffer for each metric chunk (default: 1).
  • compression: uses pako to compress messages sent over to Prisma. Set to false if you wish to consume the stream with a different tool (default: true).
  • files: an array of services to monitor. The following options can be configured for each file.
    • metric: supported metrics apache2|monolog|mysql|nginx|php-fpm|redis
    • file: the absolute path to your log file.
    • eventType: apache2 and/or nginx requires this property to be set to one of the following http|error.
    • timezone: IANA time zone in which your logs are stored (e.g UTC, America/New York, etc),
    • fromBeginning: set to true if you wish to read files from the beginning (default: false).

Config example

{
  "hostname": "192.168.10.1",
  "backpressure": 1000,
  "chunks": 500,
  "compression": true,
  "files": [{
    "metric": "nginx",
    "file": "path/to/nginx/access.log",
    "eventType": "http",
    "timezone": "UTC",
    "fromBeginning": true
  },
    {
      "metric": "nginx",
      "file": "path/to/nginx/error.log",
      "eventType": "error",
      "timezone": "UTC",
      "fromBeginning": false
    }]
}

Development setup

npm install
npm run dev
npm run docker:build
npm test

Meta

Bruce Lampson – @Brucelampson

Distributed under the MIT License. See LICENSE for more information.

https://github.com/BruceLampson

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request