Hi Nick,

Thanks ... I do try StackOverflow from time to time for these sorts of
technical issues, but have very limited success. Perhaps I'm using bad
tags. See for example a logging related question I posted there on Friday
about JSON credentials for logging
https://stackoverflow.com/questions/43004904/accessing-gae-log-files-using-google-cloud-logging-python

Regarding the v1.RequestLog error that's the topic of this thread: we do
not use StackDriver logging in our GAE deployment, so I wonder whether
cloud.logging only supports StackDriver logs?

Otherwise, I am at a loss as to why google.cloud.logging can't understand
the log format it fetches from our GAE deployment?

We've now been without access to our log data for almost a week, so I'm
getting quite desperate to find a solution either with request_logs or
cloud.logging :-)

Thanks for your help.

Julian




On Mon, Mar 27, 2017 at 11:58 AM, 'Nick (Cloud Platform Support)' via
Google App Engine <google-appengine@googlegroups.com> wrote:

> 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 a topic in the
> Google Groups "Google App Engine" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/google-appengine/M01jjjNc1dQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> google-appengine+unsubscr...@googlegroups.com.
> To post to this group, send email to google-appengine@googlegroups.com.
> 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
> <https://groups.google.com/d/msgid/google-appengine/cd373f85-74d3-4dab-97d7-2693bf1dc6e2%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
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/CAAxkZQsnx7TZXsd94h733WBC_WyKL5c161ob7oKey%3DmzfrSA7Q%40mail.gmail.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