Open
Description
After importing plotly.io and setting the pio.renderers.default = "notebook"
in my Python code, All Log messages appearing twice with Python Logging
python version: 3.9.12
plotly version: 6.1.2
import logging
# create logger
logger = logging.getLogger('simple_example')
logger.setLevel(logging.DEBUG)
# create console handler and set level to debug
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
# create formatter
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
# add formatter to ch
ch.setFormatter(formatter)
# add ch to logger
logger.addHandler(ch)
## print some message
logger.info("hello test") #### till this point all looks good
## now import plotly
import plotly.io as pio
pio.renderers.default = "notebook"
## use the logger again , now the same logger.info printing the log message twice
logger.info("hello test after import")
Metadata
Metadata
Assignees
Labels
No labels