UNPKG

1.04 kBPlain TextView Raw
1#!/usr/bin/env node
2
3const program = require( "commander" );
4const utils = require( "../lib/utils" );
5
6console.log( "Fetching the logs..." );
7
8program
9 .version( "0.0.0" )
10 .option( "--name [value]", "STRING - The name of the Lambda that is being logged", "" )
11 .option( "--env [value]", "STRING (Default: live) - The environment you want to run in", "live" )
12 .option( "--search [value]", "STRING - Optional string to search the logs for" )
13 .option( "--start_time [start_time]", "STRING (Default: undefined) - A date time to start your search from" )
14 .option( "--tail", "BOOLEAN (Default: false) - Watch the logs in real time", true )
15 .option( "--aws_profile [name]", "STRING - (Default: undefined) - The AWS profile name to use for interacting with AWS" )
16 .option( "--use_bastion", "BOOLEAN (Default: false) Flag to tell Colly to authenticate you against a bastion service before interacting with AWS" )
17 .parse( process.argv );
18
19program.tail = program.tail || false;
20
21utils.setOptions( program );
22
23require( "../lib/watch-log" ).init();
\No newline at end of file