Skip to content

Commit 1ac7d42

Browse files
author
Ace Nassri
authored
Logging: remove extraneous GCP_PROJECT env var (#2223)
1 parent 84eaada commit 1ac7d42

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

functions/log/main.py

Lines 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)