aleios-cloud / aleios-cloud/sls-dev-tools

help request: not seeing any data in the "Server log"

Đang mở
#415 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
871
Fork
45
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Howdy,
This tool looks great! I'm just trying it out for the first time - sorry for the noob questions. I'm struggling to get cloudwatch logs to feed into `Server Log`. I've tried setting the `--start-time` but no dice. I can list the lambda, invoke it from sls-dev-tools (and see the result in `Dashboard Logs`), and see stats - but the data is not feeding through.

How can I debug it?

## What I've tried

- fiddling with start time
- `sls-dev-tools -r eu-west-2 -n sls-dev-tools-test-prod -t '10 September 2020 00:00 GMT'`
- deploying to different regions (none working): eu-west-2, us-west-1, af-south-1
- confirmed that cloudwatch logs are present = check
```sh
CWLOG=/aws/lambda/sls-dev-tools-test-prod-hello && aws logs describe-log-streams --log-group-name $CWLOG | jq -r .logStreams[].logStreamName | tr '\n' '\0' | xargs -0 -n1 aws logs get-log-events --log-group-name $CWLOG --log-stream-name | jq -j ".events[].message"
# returns logs correctly
```
- multiple sls-dev-tools versions:
- tried latest 2: 1.1.10 & 1.1.8

## More info on my environment

- lambda
- deployed using serverless
- regions: eu-west-2, us-west-1, af-south-1
- os
- Ubuntu 18.04.5 LTS
- serverless
- `Framework Core: 2.0.0. Plugin: 4.0.2, SDK: 2.3.1, Components: 3.1.2`
- node = v14.1.0

## lambda source

serverless.yml

```yaml
service: sls-dev-tools-test

provider:
name: aws
runtime: nodejs12.x
region: eu-west-2
stage: prod

functions:
hello:
handler: hello.get
```

hello.js

```js
exports.get = function (event, context, callback) {
console.log(JSON.stringify({ event, context }, null, 2));
const response = {
statusCode: 200,
body: JSON.stringify({
event,
context,
message: "hi world",
}),
};
callback(null, response);
};
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.