Skip to content

Broadcast to subscribers with an external process that were logged with Good

License

Notifications You must be signed in to change notification settings

kevinmstephens/good-broadcast

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

good Logo

Build Status

Lead Maintainer: Lloyd Benson

broadcasting logs

good-broadcast includes a 'broadcast' script that is capable of broadcasting a log file externally via a POST request to the designated server. Below is the command to use to execute 'broadcast':

broadcast -c broadcast.json

Config File

A broadcast.json may look like:

{
    "url": "http://analytics.mysite.com",
    "interval": 1000,
    "log": "/fullpath/request_services.log",
    "newOnly": true,
    "resumePath": "/fullpath/temp/logindex.tmp",
    "wait": 1000,
    "attempts": 1
}

Configuration Object

  • url - (required) The complete URL to POST log information.
  • interval - The frequency to check the log file for changes. Defaults to 1000.
  • log - (required) Path to the log file.
  • newOnly - Only send new log entries. Defaults to false.
  • resumePath - Maintain a file to keep track of previous reads and start from that index on restarts or failures.
  • wait - Number of milliseconds to wait before trying a failed broadcast again. Defaults to 1000.
  • attempts - Number attempts to make before giving up on the current payload. Defaults to 1.

Killing Process

Sending issuing kill -SIGUSR2 PID, where PID is the running broadcast script. You can get the PID with the following linux command ps auxww | grep node.

About

Broadcast to subscribers with an external process that were logged with Good

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.6%
  • Makefile 0.4%