Comments (5)
Hey @rbarcelos Can you please explain more about the issue with current logging and the your suggestion to fixing it ?
from heyoo.
Disclaimer: I just started playing with Python so no guarantees that my guidance is correct..
Looking at your code (iniit.py), given the way that you are setting up logging, it will be called as soon as I import your module. For some reason, calling logging.basicConfig with my configs after that wont update it.
One possible fix: make logging an optional parameter on WhatsApp ctor. So consumers can passe their instance instead of you creating yours. It aligns with the dependency injection pattern
from heyoo.
I tried to look into this a little and find some best practices. https://docs.python.org/3/howto/logging.html#configuring-logging-for-a-library
I think the library should use _logger = logging.getLogger(__name__)
and give the specific configuration to the user.
I could look into it further and create a PR.
from heyoo.
I see
Please proceed @soerenetler
from heyoo.
Resolved by #71
from heyoo.
Related Issues (20)
- TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' HOT 3
- Import error HOT 2
- Key error in changed_field for webhook HOT 3
- Looping old messages ( I am Building a chatbot for Whatsapp) HOT 2
- Typo in the docs HOT 3
- Make it just like discord.py HOT 3
- seems like incorrect method HOT 2
- Messange order HOT 6
- get_message for messages of type interactive or list_reply HOT 6
- send template message in different translations (spanish) HOT 3
- Only one method for sending templates HOT 4
- Elevate Error of API HOT 5
- Release to PyPI HOT 3
- INFO - Message sent to number but it no longer arrives to WA HOT 4
- Receiving multiple webhook new message data for single question HOT 3
- recipient phone number not in allowed list HOT 2
- where can I get the token? (i have 3 different ones) HOT 2
- Video not received HOT 4
- Function download_media: audio name format error HOT 1
- .send_message does not send messages HOT 20
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heyoo.