Open maximlt opened 5 days ago
With https://github.com/dask/distributed/pull/8634 this will be a little less severe since we're delaying the initialization of logging until we actually need it but once we do it may still be global
Cool I didn't see this PR, it's definitely going in the right direction :) Thanks for working on that!
Describe the issue:
Panel is a Python dashboarding framework that builds on and extends Bokeh. We have observed (https://github.com/holoviz/panel/issues/2302) that importing
distributed
in a Panel application affects the logs emitted by Bokeh.The issue is that on import
distributed
configures some loggers, including Bokeh's logger that is set to theERROR
level, while it's by default at theINFO
level.https://github.com/dask/distributed/blob/50700f381075c8d2be1b17dacc1b5f48dcc93a88/distributed/config.py#L215
https://github.com/dask/distributed/blob/50700f381075c8d2be1b17dacc1b5f48dcc93a88/distributed/config.py#L97-L102
I would say that setting Bokeh's logger should not be done on import but only when the Dask dashboard is launched.
Minimal Complete Verifiable Example:
Install panel, launch this app with
panel serve app.py
and visit it at http://localhost:5006.You will get these logs printed in the console:
However, you should get these logs (comment out
import distributed
), with two additional lines.Anything else we need to know?:
There's been some discussion already on this topic in 2019 when the bokeh log level set by
distributed
was decreased from CRITICAL to ERROR.https://github.com/dask/distributed/issues/1683 https://github.com/dask/distributed/pull/3087
Environment: