Use -10m as the default start time.
a-h opened this issue ยท 0 comments
a-h commented
I just spent a few minutes wondering why I wasn't seeing any log output. ๐
I was using saw get /aws/lambda/<group_name>
but forgot to add --start -10m
to the end of the command.
The default is time.Now()
so I wasn't seeing any logs.
Lines 84 to 92 in 77bbab2
AWS SAM [1] and Serverless Framework [2] both use -10m
as their default for log retrieval, whereas saw
uses the current time.
- [1] - https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-cli-command-reference-sam-logs.html
- [2] - https://www.serverless.com/framework/docs/providers/aws/cli-reference/logs/
Seems like a straightforward change to set the empty string ""
to -10m
to match.
Lines 42 to 51 in 77bbab2
What do you think? I've applied it in my fork, and am using it. Happy to PR.