# Disable Agent debug messages for inference

**URL:** <https://forum.rasa.com/t/disable-agent-debug-messages-for-inference/58857>\
**Category:** Rasa Open Source\
**Created:** [July 2, 2023, 3:32pm UTC](https://forum.rasa.com/t/disable-agent-debug-messages-for-inference/58857 "2023-07-02T15:32:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabriel-bercaru](https://avatars.discourse-cdn.com/v4/letter/g/e79b87/32.png) [@gabriel-bercaru](https://forum.rasa.com/u/gabriel-bercaru)\
**Post date:** [July 2, 2023, 3:32pm UTC](https://forum.rasa.com/t/disable-agent-debug-messages-for-inference/58857/1 "2023-07-02T15:32:23Z")

</div>

Hello,

I am using a pretrained RASA model (obtained through `rasa nlu train`) in order to perform inference for a set of short sentences. Previously, I used RASA 3.1.0 for this, however, after updating to RASA 3.6.0 I get a debug message for each sentence in the test set, which makes inference slower. Each message looks like this:

2023-07-02 15:04:59 [debug] processor.message.parse parse\_data\_entities= parse\_data\_intent={‘name’: ‘country\_support’, ‘confidence’: 0.9956925511360168} parse\_data\_text=What countries do you do business in?

How can I disable these debug messages? I’ve looked in the documentation for Agent ([rasa.core.agent](https://rasa.com/docs/rasa/reference/rasa/core/agent/#load)) and parse\_message ([rasa.core.agent](https://rasa.com/docs/rasa/reference/rasa/core/agent/#parse_message)) but I did not find any flag to turn on / off the debug messages. How can I turn them off?

Thank you!

---

<div class="post-metadata">

**Author:** ![sonam](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/sonam/32/23321_2.png) [@sonam](https://forum.rasa.com/u/sonam)\
**Post date:** [July 2, 2023, 8:01pm UTC](https://forum.rasa.com/t/disable-agent-debug-messages-for-inference/58857/2 "2023-07-02T20:01:16Z")

</div>

Hi,

Have you used 3.5, does it has same error?

---

<div class="post-metadata">

**Author:** ![mbbyn](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mbbyn/32/22674_2.png) [@mbbyn](https://forum.rasa.com/u/mbbyn)\
**Post date:** [July 10, 2023, 7:33am UTC](https://forum.rasa.com/t/disable-agent-debug-messages-for-inference/58857/3 "2023-07-10T07:33:14Z")

</div>

Hi @sonam , we are facing the same issue after updating from Rasa 3.5.11 to 3.7.0b1. The issue was not present in 3.5.11. Happy to share more details if required.

---

<div class="post-metadata">

**Author:** ![mbbyn](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mbbyn/32/22674_2.png) [@mbbyn](https://forum.rasa.com/u/mbbyn)\
**Post date:** [July 10, 2023, 7:40am UTC](https://forum.rasa.com/t/disable-agent-debug-messages-for-inference/58857/4 "2023-07-10T07:40:39Z")

</div>

Regarding how to turn off these messages, the obvious approach is to set `LOG_LEVEL` environment variable, as defined in `constants.py`. However, even if not defined, the default log level is `INFO`, so debug messages shouldn’t appear, but they do.

---

<div class="post-metadata">

**Author:** ![mbbyn](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mbbyn/32/22674_2.png) [@mbbyn](https://forum.rasa.com/u/mbbyn)\
**Post date:** [July 10, 2023, 7:48am UTC](https://forum.rasa.com/t/disable-agent-debug-messages-for-inference/58857/5 "2023-07-10T07:48:13Z")

</div>

[https://rasa-open-source.atlassian.net/browse/OSS-718](https://rasa-open-source.atlassian.net/browse/OSS-718)

---

<div class="post-metadata">

**Author:** ![mbbyn](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mbbyn/32/22674_2.png) [@mbbyn](https://forum.rasa.com/u/mbbyn)\
**Post date:** [July 10, 2023, 8:39am UTC](https://forum.rasa.com/t/disable-agent-debug-messages-for-inference/58857/6 "2023-07-10T08:39:15Z")

</div>

Found the following solution. We now call the configure structlog function in addition to the configure logs and warnings function:

```python
def prepare_rasa_env_inline():
    import warnings

    from rasa.utils.common import configure_logging_and_warnings
    from rasa.utils.log_utils import configure_structlog

    # for rasa logging
    os.environ["LOG_LEVEL"] = "INFO"
    os.environ["LOG_LEVEL_LIBRARIES"] = "INFO"

    configure_logging_and_warnings()
    configure_structlog()

    ...

```
