@asbjornenge/log-scraper
v1.0.7
Published
Tiny little log scraper.
Downloads
16
Readme
LogScraper
Tiny little log scraper.
It follows the docker logs API and assumes you want both stdout
and stderr
and timestamps
. It uses the since
parameter to avoid scraping the same logs twice.
Install
npm install --save @asbjornenge/log-scaper
Use
import { createScrapers } from 'log-scraper'
let scrapers = createScrapers({},[
{
name : 'my-service-1',
uri : 'http://my-service-1:8080/logs'
},
{
name : 'my-service-2',
uri : 'http://my-docker-host-1:4243/containers/my-service-2/logs'
}
])
scrapers.forEach(s => s.on('data', dataHandler.bind(undefined, s.service)))
scrapers.forEach(s => s.on('error', errorHandler))
scrapers.forEach(s => s.start())
Changelog
1.0.1
- Added a build
1.0.0
- Initial release :tada: