manasg / gae-log-fetcher Goto Github PK
View Code? Open in Web Editor NEWDownload Google App Engine logs using logservice API
Download Google App Engine logs using logservice API
I wan to test your app, but raise error 404:
Traceback (most recent call last):
File "fetcher.py", line 242, in <module>
fetch_logs(get_time_period(), RECOVERY_LOG, username, password, app_name, version_ids, offset, dump, append)
File "fetcher.py", line 131, in fetch_logs
remote_api_stub.ConfigureRemoteApi(None, REMOTE_API_PATH, f, app_name, secure=True)
File "/home/ali/bin/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 874, in ConfigureRemoteApi
app_id = GetRemoteAppIdFromServer(server, path, rtok)
File "/home/ali/bin/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 569, in GetRemoteAppIdFromServer
response = server.Send(path, payload=None, **urlargs)
File "/home/ali/bin/google_appengine/google/appengine/tools/appengine_rpc.py", line 393, in Send
f = self.opener.open(req)
File "/usr/lib/python2.7/urllib2.py", line 437, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 550, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 475, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 558, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 404: Not Found
I don't undrestand why!
Could you help me?
Interesting API behaviour -
2013-09-04 07:58:43,826 - root - INFO - Fetching logs from 2013-09-04 07:52:00-07:00 to 2013-09-04 07:53:00-07:00 (GAE TZ)
2013-09-04 07:58:43,827 - root - INFO - Interval : 1378306320 - 1378306380
2013-09-04 07:58:45,481 - root - INFO - Fetched 100 logs so far
2013-09-04 07:58:46,871 - root - INFO - Fetched 200 logs so far
...
2013-09-04 07:59:07,686 - root - INFO - Fetched 2000 logs so far
2013-09-04 07:59:07,694 - root - INFO - Retrieved 2009 logs
2013-09-04 07:59:28,564 - root - INFO - Fetching logs from 2013-09-04 07:52:30-07:00 to 2013-09-04 07:53:00-07:00 (GAE TZ)
2013-09-04 07:59:28,566 - root - INFO - Interval : 1378306350 - 1378306380
2013-09-04 07:59:30,316 - root - INFO - Fetched 100 logs so far
...
2013-09-04 07:59:54,648 - root - INFO - Fetched 1900 logs so far
2013-09-04 07:59:56,056 - root - INFO - Fetched 2000 logs so far
2013-09-04 07:59:56,064 - root - INFO - Retrieved 2009 logs
2013-09-04 08:00:49,773 - root - INFO - Fetching logs from 2013-09-04 07:52:00-07:00 to 2013-09-04 07:52:30-07:00 (GAE TZ)
2013-09-04 08:00:49,775 - root - INFO - Interval : 1378306320 - 1378306350
2013-09-04 08:00:52,003 - root - INFO - Fetched 100 logs so far
2013-09-04 08:00:58,060 - root - INFO - Fetched 200 logs so far
2013-09-04 08:00:59,915 - root - INFO - Fetched 300 logs so far
....
2013-09-04 08:01:22,857 - root - INFO - Fetched 1800 logs so far
2013-09-04 08:01:23,818 - root - INFO - Fetched 1900 logs so far
2013-09-04 08:01:23,839 - root - INFO - Retrieved 1926 logs
Where did these new logs come from?
Timestamps in these "new" logs verify the authenticity. And they are in GAE console as well.
Found a problem when deploying to a server whose timezone = PDT. My dev vagrant machine is in UTC.
The timestamps are off - causing no logs to be returned.
example -
timestamp sent to GAE_API 1377860970
actual timestamp - 1377832140
Getting this error with valid configuration :
ubuntu@ip-10-231-62-33:~/gae-log-fetcher$ python ./fetcher.py gae.log
Traceback (most recent call last):
File "./fetcher.py", line 239, in
fetch_logs(get_time_period(), RECOVERY_LOG, username, password, app_name, version_ids, offset, dump, append)
File "./fetcher.py", line 129, in fetch_logs
remote_api_stub.ConfigureRemoteApi(None, '/remote_api', f, app_name)
File "/home/ubuntu/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 725, in ConfigureRemoteApi
app_id = GetRemoteAppIdFromServer(server, path, rtok)
File "/home/ubuntu/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 568, in GetRemoteAppIdFromServer
response = server.Send(path, payload=None, *_urlargs)
File "/home/ubuntu/google_appengine/google/appengine/tools/appengine_rpc.py", line 409, in Send
f = self.opener.open(req)
File "/usr/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(_args)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 302: Found
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.