views:

30

answers:

1

I need to analyze app engine logs to know the bandwidth used. All requests show 0b for static files. How to change this behavior?

+1  A: 

I asked a related question once, http://stackoverflow.com/questions/2121984/google-app-engine-request-log-breakdown and it seems they either round down or truncate for less than 1k when you use the admin site.

However, if you export the logs using appcfg.py request_logs you should be able to get a finer grained value for bandwidth used, at least it works for me with python. Note, the %b does not include request headers, so you will still see some 0's. http://code.google.com/appengine/docs/python/tools/uploadinganapp.html#Downloading_Logs

appcfg.py request_logs . logname.txt

dar
Thanks for your answer, I resolved this issue by serving files with python script. Now all logs contain file size.
Max
If I understand you correctly you are saying you are serving your static files through python instead of static in app.yaml. This might not be a good idea because you are going to use extra cpu and possibly bandwidth. I encourage you to set this back after you get the numbers you are looking for.
dar