holoviz / panel

Panel: The powerful data exploration & web app framework for Python
https://panel.holoviz.org
BSD 3-Clause "New" or "Revised" License
4.62k stars 504 forks source link

Panel logger default level not working #6444

Open aditya3434 opened 6 months ago

aditya3434 commented 6 months ago

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

MarcSkovMadsen commented 6 months ago

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

singharpit94 commented 5 months ago

Hi, any updates here?

MarcSkovMadsen commented 5 months ago

+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.

mhorlacher commented 1 month ago

@MarcSkovMadsen The link is dead.

MarcSkovMadsen commented 1 month ago

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