We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6da2b63 + a41a72d commit edcff80Copy full SHA for edcff80
cloud_logging/api/list_logs.py
@@ -25,6 +25,7 @@
25
26
# [START all]
27
import argparse
28
+import sys
29
30
from googleapiclient import discovery
31
from oauth2client.client import GoogleCredentials
@@ -36,6 +37,9 @@ def list_logs(project_id, logging_service):
36
37
38
while request:
39
response = request.execute()
40
+ if not response:
41
+ print("No logs found in {0} project").format(project_id)
42
+ return False
43
for log in response['logs']:
44
print(log['name'])
45
0 commit comments