Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

cwlogs

1.0.3 • Public • Published

cwlogs

Build Status

Node.js stream-based access to CloudWatch Logs.

Node.js API

cwlogs

The cwlogs module

Examples

var cwlogs = require('cwlogs');

readable

Provide a readable stream of log events for a particular log group

Parameters

  • options object default Node.js ReadableStream options with extensions detailed below.
    • options.group string the name of the LogGroup to read
    • options.region string the AWS region in which the LogGroup resides
    • options.pattern [string] a search string to use to filter log events
    • options.start [number] read log events after the provided time (in ms since since Jan 01 1970) (optional, default 15minutesago)
    • options.start [number] read log events until the provided time (in ms since since Jan 01 1970) (optional, default now)
    • options.messages [boolean] if set to true, the stream will be in objectMode: false and will provide only log event messages (optional, default false)
    • options.retry [function] a function to handle retry events from AWS requests

Examples

var readable = cwlogs.readable({
  group: '/aws/lambda/my-lambda-function-name',
  region: 'us-east-1',
  messages: true,
  start: 1464984431610,
  end: 1464985321508,
  pattern: 'error'
});
readable.pipe(process.stdout);

Returns object a Node.js ReadableStream

CLI tool

work-in-progress

install

npm i cwlogs

Downloadsweekly downloads

66

version

1.0.3

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability