panel icon indicating copy to clipboard operation
panel copied to clipboard

Panel logger default level not working

Open aditya3434 opened this issue 1 year ago • 5 comments

It seems like the panel logger default level set to DEBUG. Shouldn't the default level be set to WARNING? Additionally, even though the level is set to DEBUG, it doesn't actually log the statements in the terminal.

Reproducer
app.py
import panel as pn
pn.extension()
import logging

logger = logging.getLogger('panel')

print(logger)                                ## Prints '<Logger panel (DEBUG)>'
print(logger.getEffectiveLevel())            ## Prints 10 (value of debug level)

button = pn.widgets.Button(name="Click me!")
slider = pn.widgets.IntSlider(start=0, end=10, value=5)

app = pn.Row(button, slider)

app.servable()
panel serve command
panel serve app.py
Expected behaviour

Show debug logs in terminal on button clicks and moving sliders image

Actual behaviour

No debug logs show

aditya3434 avatar Mar 06 '24 06:03 aditya3434

+1. We also need a how-to guide on logging.

MarcSkovMadsen avatar Mar 06 '24 17:03 MarcSkovMadsen

Hi, any updates here?

singharpit94 avatar Mar 20 '24 08:03 singharpit94

+1. We also need a how-to guide on logging.

I've contributed a how-to guide on logging. It's in the main branch and can be viewed at https://holoviz-dev.github.io/panel/how_to/configure_logging.html before Panel 1.4.0 release.

It might not solve this issue though.

MarcSkovMadsen avatar Mar 20 '24 11:03 MarcSkovMadsen

@MarcSkovMadsen The link is dead.

mhorlacher avatar Jul 24 '24 09:07 mhorlacher

The guide has been released and can be found at https://panel.holoviz.org/how_to/logging/index.html.

MarcSkovMadsen avatar Jul 24 '24 11:07 MarcSkovMadsen