ppaulojr
ppaulojr

Reputation: 3647

gcloud get-logs command not working

I was trying to download logs from a GAE app using the gcloud cli

In the documentation the command I was supposed to use was:

gcloud preview app get-logs --version 1 default mylogs.txt

However, when running this command I get the following error:

ERROR: (gcloud.preview.app) Invalid choice: 'get-logs'. Did you mean 'deploy'?

All the tools are installed and there's nothing to update using gcloud components list and gcloud components update

Also I have authenticated and set the project

gcloud auth login
gcloud config set project mytestproject

Upvotes: 2

Views: 426

Answers (2)

John Asmuth
John Asmuth

Reputation: 1062

This command moved to go underneath the modules command group, and unfortunately the documentation lagged behind.

The equivalent command is

$ gcloud preview app modules get-logs --version 1 default mylogs.txt

Sorry for the confusion!

Upvotes: 3

Shobhit
Shobhit

Reputation: 488

You can also try appcfg.py request_logs myapp/ mylogs.txt to download the logs for your application which is running in App Engine.

This Command only works for App Engine but not for Managed VM's.Refer to the link https://cloud.google.com/appengine/docs/python/tools/uploadinganapp#Python_Downloading_logs

Upvotes: 0

Related Questions