Hey Julian,

I've been able just now to run the same code fine. What might you mean by 
"the type of logging we use on GAE"? Are you doing anything particularly 
odd there?

It's worth mentioning here that this forum isn't meant for technical 
support but rather for general discussion of the platform, services, design 
patterns, etc. This question should have been posted to stackoverflow.com 
on a relevant Cloud Platform / App Engine tag. We monitor Stack Overflow 
regularly, so we'll be able to answer there, although we can perhaps help 
debug this a little here before you move to post there.

Cheers,

Nick
Cloud Platform Community Support

On Monday, March 27, 2017 at 12:25:45 PM UTC-4, Julian Bunn wrote:
>
> Right now we cannot use the request_logs feature for downloading our GAE 
> logs (see my other thread on that problem!), so I thought I would try the 
> newer google.cloud features, and get modern :-)
>
> Here is the simple test I tried:
>
> from google.cloud import logging
> from google.cloud.logging import DESCENDING
> def main():
>     client = logging.Client() 
>     for entry in client.list_entries(order_by=DESCENDING):
>         print entry
> if __name__ == '__main__':
>     main()
>
> When executing this (after setting up the gcloud credentials), there seems 
> to be a problem parsing the log entries:
>
> python GetLogsCloud.py
> Traceback (most recent call last):
>   File "GetLogsCloud.py", line 25, in <module>
>     main()
>   File "GetLogsCloud.py", line 18, in main
>     for entry in client.list_entries(order_by=DESCENDING):
>   File "c:\python27\lib\site-packages\google\cloud\iterator.py", line 219, 
> in _items_iter
>     for item in page:
>   File "c:\python27\lib\site-packages\google\cloud\iterator.py", line 163, 
> in next
>     result = self._item_to_value(self._parent, item)
>   File "c:\python27\lib\site-packages\google\cloud\logging\_gax.py", line 
> 488, in _item_to_entry
>     resource = MessageToDict(entry_pb)
>   File "c:\python27\lib\site-packages\google\protobuf\json_format.py", 
> line 133, in MessageToDict
>     return printer._MessageToJsonObject(message)
>   File "c:\python27\lib\site-packages\google\protobuf\json_format.py", 
> line 164, in _MessageToJsonObject
>     return self._RegularMessageToJsonObject(message, js)
>   File "c:\python27\lib\site-packages\google\protobuf\json_format.py", 
> line 196, in _RegularMessageToJsonObject
>     js[name] = self._FieldToJsonObject(field, value)
>   File "c:\python27\lib\site-packages\google\protobuf\json_format.py", 
> line 230, in _FieldToJsonObject
>     return self._MessageToJsonObject(value)
>   File "c:\python27\lib\site-packages\google\protobuf\json_format.py", 
> line 162, in _MessageToJsonObject
>     return methodcaller(_WKTJSONMETHODS[full_name][0], message)(self)
>   File "c:\python27\lib\site-packages\google\protobuf\json_format.py", 
> line 266, in _AnyMessageToJsonObject
>     sub_message = _CreateMessageFromTypeUrl(type_url)
>   File "c:\python27\lib\site-packages\google\protobuf\json_format.py", 
> line 341, in _CreateMessageFromTypeUrl
>     'Can not find message descriptor by type_url: {0}.'.format(type_url))
> TypeError: Can not find message descriptor by type_url: 
> type.googleapis.com/google.appengine.logging.v1.RequestLog.
>
> I'm wondering what the issue is here ... is it because of the type of 
> logging we use on GAE?
>
> Thanks!
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/cd373f85-74d3-4dab-97d7-2693bf1dc6e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • [google-appengine] E... Julian Bunn
    • [google-appengi... 'Nick (Cloud Platform Support)' via Google App Engine
      • Re: [google... Julian Bunn
        • Re: [go... 'Nick (Cloud Platform Support)' via Google App Engine
          • Re:... Julian Bunn
            • ... 'Nick (Cloud Platform Support)' via Google App Engine
              • ... Julian Bunn
                • ... 'Nick (Cloud Platform Support)' via Google App Engine

Reply via email to