Title: logging.info() triggers basicConfig() · Issue #332 · googleapis/python-storage · GitHub
Open Graph Title: logging.info() triggers basicConfig() · Issue #332 · googleapis/python-storage
X Title: logging.info() triggers basicConfig() · Issue #332 · googleapis/python-storage
Description: When I use download_as_string() method or similar, logging.root logger is being activated by calling logging.info() on line python-storage/google/cloud/storage/blob.py Line 926 in 63ff233 logging.info(msg) . It causes other loggers to be...
Open Graph Description: When I use download_as_string() method or similar, logging.root logger is being activated by calling logging.info() on line python-storage/google/cloud/storage/blob.py Line 926 in 63ff233 logging.i...
X Description: When I use download_as_string() method or similar, logging.root logger is being activated by calling logging.info() on line python-storage/google/cloud/storage/blob.py Line 926 in 63ff233 logging.i...
Opengraph URL: https://github.com/googleapis/python-storage/issues/332
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"logging.info() triggers basicConfig()","articleBody":"When I use `download_as_string()` method or similar, `logging.root` logger is being activated by calling `logging.info()` on line \r\nhttps://github.com/googleapis/python-storage/blob/63ff23387f5873c609490be8e58d69ba34a10a5e/google/cloud/storage/blob.py#L926. It causes other loggers to be logged by the root logger which is unexpected as some apps require a single logger in strict format.\r\n\r\n#### Environment details\r\n\r\n - OS type and version: ubuntu 20.04\r\n - Python version: `3.8.6`\r\n - pip version: `20.2.4`\r\n - `google-cloud-storage` version: `1.33.0`\r\n\r\n#### Steps to reproduce\r\n\r\n 1. set up your own logger for any logger\r\n 2. call `logger.info(\"test\")` (nothing should happen)\r\n 3. run Client.from_service_account_json().get_bucket(...).blob(..., chunk_size=1024*1024).download_as_string()\r\n 4. call `logger.info(\"test\")` one more time\r\n 5. log in basic format should appear on stdout (unexpected)\r\n\r\n### How to fix it ###\r\nyou need to use your own logger (e.g. using `logging.getLogger(__name__)` instead of root logger.","author":{"url":"https://github.com/kamilglod","@type":"Person","name":"kamilglod"},"datePublished":"2020-12-01T14:41:08.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/332/python-storage/issues/332"}
| 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:502ca1f3-6b02-c609-1ef6-e6e279d798be |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A54C:30372D:11C8A1:1A5B8C:6A4DFC68 |
| html-safe-nonce | 9fac301621ea11cc4c36e53c1d134cf767496ee577d268a4ad38d45056b6bd35 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTRDOjMwMzcyRDoxMUM4QTE6MUE1QjhDOjZBNERGQzY4IiwidmlzaXRvcl9pZCI6IjUyMTU4MzE0MTAxNDk4MTc0NDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8647b00f9fb45647db4e98df324406095ba5a597f4631378572f253b292c0947 |
| hovercard-subject-tag | issue:754454384 |
| 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-storage/332/issue_layout |
| twitter:image | https://opengraph.githubassets.com/92e7eade33b973450a1fa2a9751235de3f7a4db5dc226b79830ef858f87d081f/googleapis/python-storage/issues/332 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/92e7eade33b973450a1fa2a9751235de3f7a4db5dc226b79830ef858f87d081f/googleapis/python-storage/issues/332 |
| og:image:alt | When I use download_as_string() method or similar, logging.root logger is being activated by calling logging.info() on line python-storage/google/cloud/storage/blob.py Line 926 in 63ff233 logging.i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kamilglod |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5818716c93c6a2925b815402541a32814e43a7b1261c322b0c2df75224289566 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/python-storage git https://github.com/googleapis/python-storage.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 226992639 |
| octolytics-dimension-repository_nwo | googleapis/python-storage |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 226992639 |
| octolytics-dimension-repository_network_root_nwo | googleapis/python-storage |
| 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 | 4314b1df11fa8a565684f3a72dc971e3785da365 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width