How to share localstack logs

i started localstack using docker with the command

$ docker run --rm -it -p 4566:4566 -p 4510-4559:4510-4559 localstack/localstack

then i wanted to share the logs as specified in the troubleshooting section by executing but i get 404

$ curl -Is localhost:4566/_localstack/diagnose
HTTP/1.1 404
Content-Type: text/plain; charset=utf-8
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: HEAD,GET,PUT,POST,DELETE,OPTIONS,PATCH
Access-Control-Allow-Headers: authorization,cache-control,content-length,content-md5,content-type,etag,location,x-amz-acl,x-amz-content-sha256,x-amz-date,x-amz-request-id,x-amz-security-token,x-amz-tagging,x-amz-target,x-amz-user-agent,x-amz-version-id,x-amzn-requestid,x-localstack-target,amz-sdk-invocation-id,amz-sdk-request
Access-Control-Expose-Headers: etag,x-amz-version-id
Content-Length: 0
date: Mon, 12 Dec 2022 09:01:34 GMT
server: hypercorn-h11
  1. how can i get the logs?
  2. how can i sample localstack from localhost using curl to see that localstack is up and running?

thank you.

Hi — We are sorry for the experience. The documentation should have accurately reflected the required information (which it had not!) and we documented it in detail over the Help & Support | Docs page.

To answer your questions — To get the logs, please add LS_LOG=trace environment variable and call the diagnostic endpoint curl -s localhost:4566/_localstack/diagnose | gzip -cf > diagnose.json.gz (after running the affected task/tasks).

The easiest way to check if LocalStack is activated is to query the health endpoint for a list of the running services:

curl localhost:4566/_localstack/health | jq

Please let us know if you face further troubles!

1 Like

@HarshCasper Thanks!

1 Like