Title: Logging: cannot log on GCE · Issue #10 · googleapis/python-logging · GitHub
Open Graph Title: Logging: cannot log on GCE · Issue #10 · googleapis/python-logging
X Title: Logging: cannot log on GCE · Issue #10 · googleapis/python-logging
Description: I have a web api deployed with docker image on GCP GCE. However failed to output any log to stackdriver logging under the tag which my VM stands for. Most importantly, the same api deployed in my dev env (IDC) can sent log to GCP stackdr...
Open Graph Description: I have a web api deployed with docker image on GCP GCE. However failed to output any log to stackdriver logging under the tag which my VM stands for. Most importantly, the same api deployed in my d...
X Description: I have a web api deployed with docker image on GCP GCE. However failed to output any log to stackdriver logging under the tag which my VM stands for. Most importantly, the same api deployed in my d...
Opengraph URL: https://github.com/googleapis/python-logging/issues/10
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Logging: cannot log on GCE","articleBody":"I have a web api deployed with docker image on GCP GCE. However failed to output any log to stackdriver logging under the tag which my VM stands for.\r\n\r\nMost importantly, the same api deployed in my dev env (IDC) can sent log to GCP stackdriver logging successfully, which can be seen in stackdriver logging under the tag 'global'. Of course, with GOOGLE_APPLICATION_CREDENTIALS included.\r\n\r\n#### Environment details\r\n\r\n1. Python 3.6.7\r\n2. ubuntu 18.04\r\n3. Cloud API access scopes: Allow full access to all Cloud APIs\r\n4. google related module\r\n```shell\r\ngoogle-api-core==1.9.0\r\ngoogle-auth==1.6.3\r\ngoogle-cloud-core==0.29.1\r\ngoogle-cloud-logging==1.10.0\r\ngoogleapis-common-protos==1.5.9\r\n```\r\n5. the service account creating this VM has the role Logs Writer added.\r\n\r\n#### Steps to reproduce\r\n\r\n1. deploy api with docker-compose within that GCE\r\n\r\n#### Code example\r\n\r\n* this is how i prepare my cloud handler\r\n```python\r\nclient = google.cloud.logging.Client()\r\ncloud_handler = CloudLoggingHandler(client, name='cloud')\r\nlogging.getLogger('cc').addHandler(cloud_handler)\r\n```\r\n\r\nReally appreciate any support. Let me know if further info are needed. \r\n","author":{"url":"https://github.com/Lance0404","@type":"Person","name":"Lance0404"},"datePublished":"2019-04-17T07:31:40.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/10/python-logging/issues/10"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:27e326b4-31af-d9f5-3b3b-91db524d4e0c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 92EC:1A77B1:10E48:15171:6A52B83F |
| html-safe-nonce | 680d4a49557e32ae8becbf425f796ddeb92ec21b2810aad57316f73a43fa56c8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MkVDOjFBNzdCMToxMEU0ODoxNTE3MTo2QTUyQjgzRiIsInZpc2l0b3JfaWQiOiI2MDU1MTEzMDY1NDA1NTI4MTI3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 5c7c6215402e3f0e91bee372b11771e2ab4f61e163507742f0bb5018ed4e29f9 |
| hovercard-subject-tag | issue:560389461 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/python-logging/10/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a70bc18e0768267160be92e3475d7d1dfa1e991330606a869226b53aab1e7db2/googleapis/python-logging/issues/10 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a70bc18e0768267160be92e3475d7d1dfa1e991330606a869226b53aab1e7db2/googleapis/python-logging/issues/10 |
| og:image:alt | I have a web api deployed with docker image on GCP GCE. However failed to output any log to stackdriver logging under the tag which my VM stands for. Most importantly, the same api deployed in my d... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Lance0404 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/python-logging git https://github.com/googleapis/python-logging.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 226992562 |
| octolytics-dimension-repository_nwo | googleapis/python-logging |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 226992562 |
| octolytics-dimension-repository_network_root_nwo | googleapis/python-logging |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width