Skip to content
This repository was archived by the owner on Oct 4, 2023. It is now read-only.
mapboxPublic archive

About

Node.js stream-based access to CloudWatch Logs

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

14 stars

Watchers

33 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

Repository files navigation

cwlogs

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

About

Node.js stream-based access to CloudWatch Logs

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

14 stars

Watchers

33 watching

Forks

Releases

Packages

Used by

Contributors

Languages