Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cloud_logging/api/list_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

# [START all]
import argparse
import sys

from googleapiclient import discovery
from oauth2client.client import GoogleCredentials
Expand All @@ -36,6 +37,9 @@ def list_logs(project_id, logging_service):

while request:
response = request.execute()
if not response:
print("No logs found in {0} project").format(project_id)
return False
for log in response['logs']:
print(log['name'])

Expand Down