@asbjornenge/log-scraper
Tiny little log scraper.
Last updated 4 years ago by asbjornenge .
ISC · Original npm · Tarball · package.json
$ cnpm install @asbjornenge/log-scraper 
SYNC missed versions from official npm registry.

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:

Current Tags

  • 1.0.7                                ...           latest (4 years ago)

8 Versions

  • 1.0.7                                ...           4 years ago
  • 1.0.6                                ...           4 years ago
  • 1.0.5                                ...           4 years ago
  • 1.0.4                                ...           4 years ago
  • 1.0.3                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 11
Last Day 0
Last Week 8
Last Month 3
Dependencies (4)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |