You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importosfromgoogle.cloudimportloggingfromgoogle.cloud.loggingimportASCENDINGfromgoogle.cloud.loggingimportDESCENDINGFILTER='resource.type="gae_app" AND logName="projects/mineral-minutia-820/logs/appengine.googleapis.com%2Frequest_log" AND protoPayload.resource="/"'# Disable gRPCclient=logging.Client(_use_grpc=0)
# Ensures this is an `HTTPIterator` rather than a (gRPC) `generator`iterator=client.list_entries(filter_=FILTER, order_by=DESCENDING)
forpageiniterator.pages:
print(' Page number: %d'% (iterator.page_number,))
print(' Items in page: %d'% (page.num_items,))
print('Items remaining: %d'% (page.remaining,))
print('Next page token: %s'% (iterator.next_page_token,))
print('----------------------------')
forentryinpage:
print(entry.timestamp)
You may also set GOOGLE_CLOUD_DISABLE_GRPC={{anything}} instead of logging.Client(_use_grpc=0)
NOTE You're not using pp so I removed references to it
The text was updated successfully, but these errors were encountered:
Per: https://github.com/salrashid123/gcpsamples#iterators
See: googleapis/python-logging#203
I think you'd want (see
# comments
):You may also set
GOOGLE_CLOUD_DISABLE_GRPC={{anything}}
instead oflogging.Client(_use_grpc=0)
The text was updated successfully, but these errors were encountered: