snowby666 / poe-api-wrapper

👾 A Python API wrapper for Poe.com. With this, you will have free access to GPT-4, Claude, Llama, Gemini, Mistral and more! 🚀
https://pypi.org/project/poe-api-wrapper/
GNU General Public License v3.0
959 stars 114 forks source link

Turn off logs #66

Closed notBradPitt closed 1 year ago

notBradPitt commented 1 year ago

How do I turn logs that shows up like the following:

2023-10-06 13:53:26.348 | INFO     | poe_api_wrapper.api:get_previous_messages:1031 - Found 0 messages of
2023-10-06 14:02:27.764 | WARNING  | poe_api_wrapper.api:on_ws_close:298 - Connection to remote host was lost. Reconnecting...
samuelchristlie commented 1 year ago

From https://github.com/Delgan/loguru/issues/138, adding the following code after importing poe-api-wrapper seems to work

from loguru import logger
logger.remove()
logger.add(sys.stderr, level="CRITICAL")
snowby666 commented 1 year ago

I will add this to the docs in the next release

mistborn17 commented 8 months ago

Does this change log level for the entire project ?