Skip to content

Commit 1f35d2e

Browse files
committed
enable logging output by default
1 parent 95fff37 commit 1f35d2e

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

pywebio/__init__.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,12 @@
1515
try_install_bokeh_hook()
1616
del try_install_bokeh_hook
1717

18-
# Set default logging handler to avoid "No handler found" warnings.
19-
import logging
2018

21-
logging.getLogger(__name__).addHandler(logging.NullHandler())
22-
23-
24-
def enable_debug(level=logging.DEBUG):
19+
def enable_debug(level=None):
2520
"""Output PyWebIO logging message to sys.stderr"""
21+
import logging
2622
from tornado.log import access_log, app_log, gen_log
23+
level = level or logging.DEBUG
2724
ch = logging.StreamHandler()
2825
ch.setLevel(level)
2926
formatter = logging.Formatter('[%(levelname)s %(asctime)s %(module)s:%(lineno)d %(funcName)s] %(message)s',

0 commit comments

Comments
 (0)