Add server-side info logging.
This commit is contained in:
1
api.py
1
api.py
@@ -197,6 +197,7 @@ class APIWrapper(webapp2.RequestHandler):
|
|||||||
'events': [],
|
'events': [],
|
||||||
}
|
}
|
||||||
for command in self.request_json['commands']:
|
for command in self.request_json['commands']:
|
||||||
|
logging.info('Command: %s', command)
|
||||||
callback = self._COMMANDS[command['command']]
|
callback = self._COMMANDS[command['command']]
|
||||||
result = callback(
|
result = callback(
|
||||||
self.verified_google_user,
|
self.verified_google_user,
|
||||||
|
|||||||
@@ -92,10 +92,12 @@ class Instance(db.Model):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def FromID(cls, instance_id):
|
def FromID(cls, instance_id):
|
||||||
|
logging.info('Instance: %s', instance_id)
|
||||||
return cls.get_by_key_name(instance_id)
|
return cls.get_by_key_name(instance_id)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def FindOrCreate(cls, instance_id):
|
def FindOrCreate(cls, instance_id):
|
||||||
|
logging.info('Instance: %s', instance_id)
|
||||||
return cls.get_or_insert(instance_id)
|
return cls.get_or_insert(instance_id)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
import logging
|
||||||
import functools
|
import functools
|
||||||
|
|
||||||
from google.appengine.ext import db
|
from google.appengine.ext import db
|
||||||
@@ -68,6 +69,9 @@ def session_required(handler):
|
|||||||
def FindOrCreateSession(self):
|
def FindOrCreateSession(self):
|
||||||
self.client, old_profile = CreateClientAndProfile(
|
self.client, old_profile = CreateClientAndProfile(
|
||||||
self.request_json['client_id'], self.verified_google_user)
|
self.request_json['client_id'], self.verified_google_user)
|
||||||
|
logging.info('Client: %s', self.client.key().name())
|
||||||
|
logging.info('Profile: %s',
|
||||||
|
models.Client.profile.get_value_for_datastore(self.client))
|
||||||
if old_profile:
|
if old_profile:
|
||||||
self.client.profile.MergeFrom(old_profile)
|
self.client.profile.MergeFrom(old_profile)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user