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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    328
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    328
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i cwlogs

Weekly Downloads

328

Version

1.0.3

License

ISC

Last publish

Collaborators

  • rclark