cwlogs
v1.0.3
Published
Node.js stream-based access to CloudWatch Logs
Downloads
609
Readme
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 readoptions.region
string the AWS region in which the LogGroup residesoptions.pattern
[string] a search string to use to filter log eventsoptions.start
[number] read log events after the provided time (in ms since since Jan 01 1970) (optional, default15minutesago
)options.start
[number] read log events until the provided time (in ms since since Jan 01 1970) (optional, defaultnow
)options.messages
[boolean] if set to true, the stream will be in objectMode: false and will provide only log event messages (optional, defaultfalse
)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