1.0.0 • Published 2 years ago
logtale v1.0.0
Logtale
A handy command-line tool for watching AWS CloudWatch logs
Features
- Continuing display real-time logs, with options, as
tail
command do - Support blur search for log group names
- List logs around specified timestamp
- e.g.
$logtale <GROUP_NAME> --around "2022-05-16T00:21:40.321Z" 10
- e.g.
Prerequisite
AWS configuration
Use environment variables to setup your configuration
export AWS_ACCESS_KEY_ID = "Your AWS Access Key ID"
export AWS_SECRET_ACCESS_KEY = "Your AWS Secret Access Key"
export AWS_REGION = "Your Region"
Installation
$ npm i -g logtale
Usage:
Basic Command
To display logs of logGroup
$ logtale <GROUP_NAME>
A list of choices is provided for selection if several groups are found:
$ logtale web
Select logGroup :
1) /web-server
2) /web-api
Directly Display logs if only one group name matched, for example:
$ logtale server # or fullname: /web-server
Displaying logs of /web-server
...
Filter
filter logs with AWS filter pattern
$ logtale <GROUP_NAME> -f "content"
Time range
From what time to begin displaying logs, supported units:
s
- secondsm
- minutesh
- hoursd
- daysw
- weeks
$ logtale <GROUP_NAME> --since 30m
Display logs at the range of start time and end time
$ logtale <GROUP_NAME> --startTime 2022-04-15 --endTime 2022-04-16
Display logs around the specified time, at a range of 10 seconds
$ logtale <GROUP_NAME> --around 2022-05-16T00:21:40.321Z 10
More usage
$ logtale -h
Reference
1.0.0
2 years ago