Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

StreamHandler added every time to logger on JupyterDash()/Dash() #61

Open
iynehz opened this issue May 18, 2021 · 1 comment
Open

StreamHandler added every time to logger on JupyterDash()/Dash() #61

iynehz opened this issue May 18, 2021 · 1 comment

Comments

@iynehz
Copy link

iynehz commented May 18, 2021

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.

@iynehz
Copy link
Author

iynehz commented May 18, 2021

ok I see there is already a ticket on the dash repo. plotly/dash#756

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant