title: How to deserialize App Engine application logs from StackDriver Logging API?
body: <p>As part of migrating to Python 3, I need to migrate from <a href="https://cloud.google.com/appengine/docs/standard/python/refdocs/google.appengine.api.logservice.logservice" rel="nofollow noreferrer">logservice</a> to the <a href="https://cloud.google.com/logging/docs/reference/api-overview" rel="nofollow noreferrer">StackDriver Logging API</a>. I have <a href="https://pypi.org/project/google-cloud-logging/" rel="nofollow noreferrer">google-cloud-logging</a> installed, and I can successfully fetch GAE application logs with eg:</p>
  
  <pre><code>&gt;&gt;&gt; from google.cloud.logging_v2 import LoggingServiceV2Client
  &gt;&gt;&gt; entries = LoggingServiceV2Client().list_log_entries(('projects/projectname',),
           filter_='resource.type="gae_app" AND protoPayload.@type="type.googleapis.com/google.appengine.logging.v1.RequestLog"')
  &gt;&gt;&gt; print(next(iter(entries)))
  proto_payload {
    type_url: "type.googleapis.com/google.appengine.logging.v1.RequestLog"
    value: "\n\ts~brid-gy\022\0018\032R5d..."
  }
  </code></pre>
  
  <p>This gets me a <code>LogEntry</code> with text application logs in the <code>proto_payload.value</code> field. How do I deserialize that field? I've found lots of related mentions in the docs, but nothing pointing me to a <code>google.appengine.logging.v1.RequestLog</code> protobuf generated class anywhere that I can use, if that's even the right idea. Has anyone done this?</p>