node package manager



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


var lylog = require('lylog')
var proxy = lylog({
  token: 'loggly user token here',
  // optional options described below 
// now go tell fastly to send syslogs to, 
// and they'll be proxied to loggly 

Or in bash:

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


$ lylog -h
lylog [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
    -e, --echo                 Print logs to stdout as well as sending them to
    -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
    -h, --help                 Display this help


  • token String, Required. Your loggly customer token.
  • host String, Default=''. 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.