Title: Make logging.basicConfig conditional by GjjvdBurg · Pull Request #670 · python-escpos/python-escpos · GitHub
Open Graph Title: Make logging.basicConfig conditional by GjjvdBurg · Pull Request #670 · python-escpos/python-escpos
X Title: Make logging.basicConfig conditional by GjjvdBurg · Pull Request #670 · python-escpos/python-escpos
Description: Hi there, thank you so much for this library, I'm having a lot of fun with it! Description I wrote a wrapper script using this library in which I'm using the logging module, and I'm noticing that all my log messages are duplicated. I found this comment in issue #559 which mentions the same thing and identifies the root cause to be the logging.basicConfig call in capabilities.py. So this PR places that call behind an environment variable, so it can still be enabled for debugging but is no longer enabled by default. I also found this section of the Python docs describing logging from a library, which seems to correspond with this change. Tested with Tested with my wrapper script and this branch. With the change I made the log messages are no longer duplicated. Thanks in advance for taking a look!
Open Graph Description: Hi there, thank you so much for this library, I'm having a lot of fun with it! Description I wrote a wrapper script using this library in which I'm using the logging module, and I'm not...
X Description: Hi there, thank you so much for this library, I'm having a lot of fun with it! Description I wrote a wrapper script using this library in which I'm using the logging module, and I&a...
Opengraph URL: https://github.com/python-escpos/python-escpos/pull/670
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:c735d7ef-d98c-bc28-d11c-5d56d04c448a |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9F00:633B1:4DC94A6:6D027F6:6A4F8A72 |
| html-safe-nonce | 970200feea062727d3cadd2ceb90d56872745dada9bfb5076a681f5fccc8f2e0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RjAwOjYzM0IxOjREQzk0QTY6NkQwMjdGNjo2QTRGOEE3MiIsInZpc2l0b3JfaWQiOiI4ODA5NTM0MzU2MDcyNjYzNjY3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 354e691b126c9a545f08c23ee9c20a8d853128dcdfd1dfaa619760657d4eb74a |
| hovercard-subject-tag | pull_request:2260920582 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/python-escpos/python-escpos/pull/670/files |
| twitter:image | https://avatars.githubusercontent.com/u/3286696?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/3286696?s=400&v=4 |
| og:image:alt | Hi there, thank you so much for this library, I'm having a lot of fun with it! Description I wrote a wrapper script using this library in which I'm using the logging module, and I'm not... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python-escpos/python-escpos git https://github.com/python-escpos/python-escpos.git |
| octolytics-dimension-user_id | 16302939 |
| octolytics-dimension-user_login | python-escpos |
| octolytics-dimension-repository_id | 32363483 |
| octolytics-dimension-repository_nwo | python-escpos/python-escpos |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 32363483 |
| octolytics-dimension-repository_network_root_nwo | python-escpos/python-escpos |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4b249b445842943ed31549e027f57a8ade9881ed |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width