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

lylog

v0.1.6

Published

Syslog proxy that receives syslogs from Fastly, and sends them to Logly.

Downloads

19

Readme

lylog

Syslog proxy that receives syslogs from Fastly, and sends them to Loggly.

USAGE

var lylog = require('lylog')
var proxy = lylog({
  token: 'loggly user token here',
  // optional options described below
})

proxy.listen(10514)

// now go tell fastly to send syslogs to logs.mysite.com:10514,
// and they'll be proxied to loggly

Or in bash:

# same as the above JavaScript
lylog \
  --token 'loggly user token here' \
  --listen 10514

CLI

$ lylog -h
lylog [options]
Options:
    -l PORT, --listen=PORT     Port that lylog listens on. Required.
    -t TOKEN, --token=TOKEN    Loggly customer token. Required.
    -p PORT, --port=PORT       Port to send Loggly messages to (default=514)
    -H HOST, --host=HOST       Hostname to send Loggly messages to
                               (default=logs-01.loggly.com)
    -e, --echo                 Print logs to stdout as well as sending them to
                               loggly
    -w LIST, --whitelist=LIST  Whitespace-separated list of IPv4 blocks to
                               accept. Defaults to the known list of Fastly IPv4
                               address blocks as of lylog publish date (see
                               "fastly-ips.txt" in lylog root). Set to "ALLOW"
                               to allow connections from any client (not
                               recommended!)
    -h, --help                 Display this help

CONFIG OPTIONS

  • token String, Required. Your loggly customer token.
  • host String, Default='logs-01.loggly.com'. The hostname on loggly where logs are sent.
  • port Number, Default=514. Port on loggly to send logs.
  • whitelist Array(String) or false. Array of Fastly IPv4 blocks to accept connections from. (Note: without this, your server is an open proxy that will spam your loggly account!)
  • echo Boolean, default=false. Print logs to stdout as well as sending to loggly. Useful if you want to maintain a local copy as well.
  • onerror Function, Optional. Call this function when upstream connections to loggly experience an error writing.
  • minFree Number, Optional, Default=16. Minimum number of free connections to loggly before reaping will occur.
  • freeReapRatio Number, Optional, Default=0.5. Minimum ratio of free loggly connections to total connections before reaping will occur. Set to 1 to never reap connections (not recommended!)

Connection Pool

Outbound connections to loggly are created as needed, and then kept alive for future use. If the free list of connections is greater than 16 (minFree config), and more than 50% of the total pool of connections (freeReapRatio config), then the bottom 50% of the free pool will be reaped. This prevents spikes from causing an abnormal number of connections to be open indefinitely.