How to log (logging) dash @callbacks?

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 :

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 ?

Anybody can help ?

Anybody can help ?

Hello @shaytangolova,

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

@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
2 Likes