🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@asbjornenge/log-scraper

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@asbjornenge/log-scraper

Tiny little log scraper.

1.0.7
latest
npm
Version published
Weekly downloads
1
-50%
Maintainers
1
Weekly downloads
 
Created
Source

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:

FAQs

Package last updated on 04 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts