从 GAE 批量下载日志

发布于 2024-10-14 20:00:47 字数 437 浏览 8 评论 0原文

我想将所有日志下载到名为“appcfg.py”的文件中。

我不使用 app.yaml,但我写了一个非常简单的:

"application: myAppId 
version: 1 
runtime: java" 

我使用这个命令:

python appcfg.py --append request_logs "app.yaml's path"  logs.txt 

而且我总是得到:

Value 'java' for key runtime does not match expression '^python$' in 
"app.yaml's path", line 3, column 10 

我应该怎么做才能下载我的所有日​​志?

I'd like to download all my logs to a file with "appcfg.py".

I don't use app.yaml, but I wrote a very simple one:

"application: myAppId 
version: 1 
runtime: java" 

I use this command:

python appcfg.py --append request_logs "app.yaml's path"  logs.txt 

And I always get:

Value 'java' for key runtime does not match expression '^python

What should I do to download all my logs?

in "app.yaml's path", line 3, column 10

What should I do to download all my logs?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦行七里 2024-10-21 20:00:47

仅供参考,如果您使用 Eclipse,则可以在安装 GAE SDK 的 Eclipse 插件目录中找到 Java appcfg.sh 脚本。在我的 Mac 上,它位于:

/Applications/eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.7.4/appengine-java-sdk-1.7.4/bin/appcfg.sh

我在 Eclipse 中运行的 GAE 项目文件夹中进行了 chdir,然后运行它:

sh /Applications/Eclipse/.../bin/appcfg.sh request_logs war log_output.txt

war 是项目内 war 文件的目录。您应该看到:

> ls war/WEB-INF/lib 
appengine-api-1.0-sdk-1.6.6.jar
appengine-jsr107cache-1.6.6.jar
...

该脚本运行 jar 文件,该文件会提示您输入电子邮件和密码(我不知道他们如何/是否保护它)。如果您使用配置的双因素身份验证,那么您'需要使用 --oauth2 参数。这需要(我猜)1.7.X 版本的 SDK,因为它在 1.6.6 中不可用。当然他们的文档不谈论版本。

Just for posterity, if you are using Eclipse, the Java appcfg.sh script can be found inside of the Eclipse plugins directory where the GAE SDK gets installed. On my Mac this is in:

/Applications/eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.7.4/appengine-java-sdk-1.7.4/bin/appcfg.sh

I chdir'd inside my GAE project folder that is running in Eclipse and then ran it like:

sh /Applications/Eclipse/.../bin/appcfg.sh request_logs war log_output.txt

The war is the directory of your war files inside your project. You should see:

> ls war/WEB-INF/lib 
appengine-api-1.0-sdk-1.6.6.jar
appengine-jsr107cache-1.6.6.jar
...

The script runs the jar file which should prompt you for your email and password (I don't know how/if they are protecting it). If you are using the two-factor auth configured then you'll need to utilize the --oauth2 parameter. This requires (I guess) a 1.7.X version of the SDK because it wasn't available in 1.6.6. Of course their docs don't talk about versions.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文