From e2ca5735cd93e0bcc87474718bce8a8cdeb45056 Mon Sep 17 00:00:00 2001 From: aofry Date: Thu, 17 May 2018 16:19:18 +0300 Subject: [PATCH] add docs about getting aws logs without giving startTime --- docs/providers/aws/cli-reference/logs.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/providers/aws/cli-reference/logs.md b/docs/providers/aws/cli-reference/logs.md index 880a4efc0..31e9b2b6e 100644 --- a/docs/providers/aws/cli-reference/logs.md +++ b/docs/providers/aws/cli-reference/logs.md @@ -62,6 +62,11 @@ This command returns as many log events as can fit in 1MB (up to 10,000 log even **Note:** There's a small lag between invoking the function and actually having the log event registered in CloudWatch. So it takes a few seconds for the logs to show up right after invoking the function. +```bash +serverless logs -f hello +``` +This will fetch the logs from last 10 minutes as startTime was not given. + ```bash serverless logs -f hello --startTime 5h ``` @@ -76,7 +81,7 @@ This will fetch the logs that happened starting at epoch `1469694264`. serverless logs -f hello -t ``` -Serverless will tail the CloudWatch log output and print new log messages coming in. +Serverless will tail the CloudWatch log output and print new log messages coming in starting from 10 seconds ago. ```bash serverless logs -f hello --filter serverless