简体   繁体   English

Google App Engine中的静态文件统计信息

[英]Statistics of static files in Google App Engine

I've set up some static files in Google App Engine and was wondering if there's any way to track how many times users access those static files. 我已经在Google App Engine中设置了一些静态文件,并且想知道是否有任何方法可以跟踪用户访问这些静态文件的次数。

I've added a file like this in my app.yaml: 我在app.yaml中添加了这样的文件:

- url: /files
  static_dir: files

I would like to track how many downloads I have gotten, if that's possible. 如果可能的话,我想跟踪我获得了多少下载。 Any clues? 有什么线索吗?

Every time somebody is requesting a file (or any kind of request) Google App Engine logs it. 每当有人请求文件(或任何类型的请求)时,Google App Engine都会记录该文件。 So in theory you could write an application that does exactly that since they have the Logs API for it. 因此,从理论上讲,您可以编写一个可以执行此操作的应用程序,因为他们具有Logs API

Otherwise you could simply check that through the dashboard of your application on 否则,您只需在应用程序的仪表板上检查

https://appengine.google.com/logs?app_id=s~app-name

and from there through the options to add some filters. 然后通过选项添加一些过滤器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM