Closed truenicoco closed 4 years ago
fbchat
's logging setup is kind of wierd, and I must admit, I don't fully understand it, but maybe you could try to provide some code that should be working, and isn't?
Unfortunately right now I've stopped using fbchat and moved to a XMPP prosody/spectrum/libpurple-facebook solution for my needs.
Here's what my code looked like anyway: https://bitbucket.org/nicocool84/fb_bot/raw/447c246b2b991cf99477a06797365a1252c15414/fb_bot.py
I'm sorry was so late at answering, and that I couldn't help you. This is definitely one of the things getting reworked next in the next major release. Good luck with your project anyways ;)
EDIT: I would guess the "solution" would be to include this:
from fbchat import log
log.setLevel(logging_level)
Though this is untested!
If you pass it as a numeric value it behaves correctly. See: Logging Levels
I will address this further in an upcoming update, seems like the logging system we use is directly in-advised: https://docs.python.org/3/howto/logging.html#configuring-logging-for-a-library
Fixed a while ago in d3a0ffc47802f6593ff8871795f53cf21bda714e, not yet released
When subclassing
fbchat.Client
, no matter whichlogging_level
is passed, the standard output displays messages at theDEBUG
level.