Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1ac7d42

Browse filesBrowse files
author
Ace Nassri
authored
Logging: remove extraneous GCP_PROJECT env var (GoogleCloudPlatform#2223)
1 parent 84eaada commit 1ac7d42
Copy full SHA for 1ac7d42

File tree

Expand file treeCollapse file tree

1 file changed

+1
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-5
lines changed

‎functions/log/main.py

Copy file name to clipboardExpand all lines: functions/log/main.py
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@
1818

1919
# [END functions_log_stackdriver]
2020

21-
# [START functions_log_retrieve]
22-
import os
23-
# [END functions_log_retrieve]
24-
2521
# [START functions_log_retrieve]
2622
import google.cloud.logging as cloud_logging
2723
# [END functions_log_retrieve]
@@ -41,7 +37,7 @@ def hello_world(data, context):
4137
# [START functions_log_retrieve]
4238
cloud_client = cloud_logging.Client()
4339
log_name = 'cloudfunctions.googleapis.com%2Fcloud-functions'
44-
cloud_logger = cloud_client.logger(log_name.format(os.getenv('GCP_PROJECT')))
40+
cloud_logger = cloud_client.logger(log_name)
4541

4642

4743
def get_log_entries(request):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.