Skip to content

Commit

Permalink
Raise bokeh's log level on serve (#682)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Oct 8, 2019
1 parent 4f2a502 commit 8cfa2dc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions panel/viewable.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""
from __future__ import absolute_import, division, unicode_literals

import logging
import re
import sys
import threading
Expand Down Expand Up @@ -497,6 +498,10 @@ def servable(self, title=None):
The Panel object itself
"""
if _curdoc().session_context:
logger = logging.getLogger('bokeh')
for handler in logger.handlers:
if isinstance(handler, logging.StreamHandler):
handler.setLevel(logging.WARN)
self.server_doc(title=title)
return self

Expand Down

0 comments on commit 8cfa2dc

Please sign in to comment.