# How to log (logging) dash @callbacks?

**URL:** <https://community.plotly.com/t/how-to-log-logging-dash-callbacks/80400>\
**Category:** Dash Python\
**Created:** [November 26, 2023, 4:41pm UTC](https://community.plotly.com/t/how-to-log-logging-dash-callbacks/80400 "2023-11-26T16:41:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shaytangolova](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@shaytangolova](https://community.plotly.com/u/shaytangolova)\
**Post date:** [November 26, 2023, 4:41pm UTC](https://community.plotly.com/t/how-to-log-logging-dash-callbacks/80400/1 "2023-11-26T16:41:13Z")

</div>

Hello, how to log dash callbacks (input, output, state) ?  
Is there a component in configuration of dash to enable it to access the root logging ?  
Logging is configured and set to DEBUG level.  
All that I can see from dash on `app.run()` is this message :

```python
2023-11-26 17:59:55,928 | dash.dash | INFO | dash.py | Dash is running on http://127.0.0.1:8080/

```

I mean I do not want to put `logging.info("button clicked")` under each callback.  
Can anybody put an example ?

---

<div class="post-metadata">

**Author:** ![shaytangolova](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@shaytangolova](https://community.plotly.com/u/shaytangolova)\
**Post date:** [November 27, 2023, 9:51am UTC](https://community.plotly.com/t/how-to-log-logging-dash-callbacks/80400/4 "2023-11-27T09:51:48Z")

</div>

Anybody can help ?

---

<div class="post-metadata">

**Author:** ![shaytangolova](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@shaytangolova](https://community.plotly.com/u/shaytangolova)\
**Post date:** [November 27, 2023, 2:24pm UTC](https://community.plotly.com/t/how-to-log-logging-dash-callbacks/80400/5 "2023-11-27T14:24:59Z")

</div>

Anybody can help ?

---

<div class="post-metadata">

**Author:** ![jinnyzor](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jinnyzor/32/21194_2.png) [@jinnyzor](https://community.plotly.com/u/jinnyzor)\
**Post date:** [November 27, 2023, 4:04pm UTC](https://community.plotly.com/t/how-to-log-logging-dash-callbacks/80400/6 "2023-11-27T16:04:54Z")

</div>

Hello @shaytangolova,

You could add a listener to intercept the endpoint `_dash-update-component` in the flask server:

```auto
@app.server.before_request
def pull_info():
    request = flask.request
    if request.method == 'POST' and '_dash-update-component' in request.url:
        print(request.json)
    return

```
