gcloud 命令 - gcloud preview app modules get-logs mymodule --version=1 \ ~/log_file.txt 不起作用

gcloud command - gcloud preview app modules get-logs mymodule --version=1 \ ~/log_file.txt doesn't work

我正在尝试获取 gcloud 日志文件以查看我在尝试将我的应用程序部署到 GCP 时遇到的错误。我查看了文档并找到了应该 'have logs saved to a file instead of being printed to standard out by specifying a file name' 的命令 gcloud preview app modules get-logs mymodule --version=1 \ ~/log_file.txt

当我 运行 命令时,我收到以下错误消息:

Roberts-MBP:wikisite Robert$ gcloud preview app modules get-logs mymodule --version=1 \ ~/log_file.txt
usage: gcloud preview app modules get-logs  MODULE  [OUTPUT_FILE] --version VERSION [optional flags]
ERROR: (gcloud.preview.app.modules.get-logs) unrecognized arguments:  ~/log_file.txt

我运行命令错了吗?或者我需要先制作 log_file.txt 文件还是什么?

尝试:gcloud preview app modules get-logs mymodule ~/log_file.txt --version=1