jupyter-dash
jupyter-dash copied to clipboard
StreamHandler added every time to logger on JupyterDash()/Dash()
If you run a code block like below for multiple times in jupyter lab, you see the log message is printed once at your first run, twice at your second run, and so on. In the end the message can print many times, depending on how many times you create the JupyterDash app.
app = JupyterDash(__name__)
app.logger.disabled = False
app.logger.info("some message")
I believe it's actually an issue in the Dash class, actually, inspecting app.logger.handlers shows that every time Dash initializes there's one more StreamHandler added. But it's obvious with JupyterDash as with Jupyterlab a person may create the dash app object for multiple times. I will also create a ticket to the Dash repo.
ok I see there is already a ticket on the dash repo. https://github.com/plotly/dash/issues/756