RasaHQ / rasa

💬 Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants
https://rasa.com/docs/rasa/
Apache License 2.0
18.32k stars 4.57k forks source link

order of function call corrected. On similar lines of rasa-sdk #13023

Open gajendrarao1979 opened 4 months ago

gajendrarao1979 commented 4 months ago

Proposed changes:

Status (please check what you already did):

CLAassistant commented 4 months ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

vcidst commented 3 months ago

Hi @gajendrarao1979, thank you for the pull request! Can you please describe the changes you've made and why are they required?

gajendrarao1979 commented 3 months ago

@vcidst Currently in rasa main.py the configure_logging_and_warnings function which configures the logging from the config file is called at line 103 and after that configure_colored_logging is called at line 116.

The configure_colored_logging function leverages coloredlogs module which discards and reinitializes logging.StreamHandler. Essentially this overwrites any changes coming from logging.yml (if someone is using StreamHandler).

In my PR I have updated the order of the function call to ensure that logging.yml changes are not overwritten. This is already correct in rasa-sdk code.

I hope this provides the explanation.

image