panel.widgets.debugger module#
The Debugger Widget is an uneditable Card that gives you feedback on errors thrown by your Panel callbacks.
- class panel.widgets.debugger.CheckFilter(name='')[source]#
Bases:
Filter
- class panel.widgets.debugger.Debugger(*, _number_of_errors, _number_of_infos, _number_of_warnings, formatter_args, level, logger_names, only_last, active_header_background, button_css_classes, collapsed, collapsible, header, header_background, header_color, header_css_classes, hide_header, title, title_css_classes, auto_scroll_limit, scroll_button_threshold, scroll_position, view_latest, scroll, objects, loading, align, aspect_ratio, css_classes, design, height, height_policy, margin, max_height, max_width, min_height, min_width, sizing_mode, styles, stylesheets, tags, visible, width, width_policy, name)[source]#
Bases:
Card
A uneditable Card layout holding a terminal printing out logs from your callbacks. By default, it will only print exceptions. If you want to add your own log, use the panel.callbacks logger within your callbacks: logger = logging.getLogger(‘panel.callbacks’)
Methods
acknowledge_errors
update_log_counts
Parameter Definitions
Parameters inherited from:
panel.viewable.Layoutable
: align, aspect_ratio, design, height, min_width, min_height, max_width, max_height, margin, styles, stylesheets, tags, width, width_policy, height_policy, sizing_mode, visiblepanel.viewable.Viewable
: loadingpanel.layout.base.ListLike
: objectspanel.layout.base.ListPanel
: scrollpanel.layout.base.Column
: auto_scroll_limit, scroll_button_threshold, scroll_position, view_latestpanel.layout.card.Card
: css_classes, active_header_background, button_css_classes, collapsible, collapsed, header, header_background, header_color, header_css_classes, hide_header, title_css_classes, title_number_of_errors = Integer(bounds=(0, None), default=0, inclusive_bounds=(True, True), label=' number of errors')
Number of logged errors since last acknowledged.
_number_of_warnings = Integer(bounds=(0, None), default=0, inclusive_bounds=(True, True), label=' number of warnings')
Number of logged warnings since last acknowledged.
_number_of_infos = Integer(bounds=(0, None), default=0, inclusive_bounds=(True, True), label=' number of infos')
Number of logged information since last acknowledged.
only_last = Boolean(default=True, label='Only last')
Whether only the last stack is printed or the full.
level = Integer(default=40, inclusive_bounds=(True, True), label='Level')
Logging level to print in the debugger terminal.
formatter_args = Dict(class_=<class 'dict'>, default={'fmt': '%(asctime)s [%(name)s - %(levelname)s]: %(message)s'}, label='Formatter args')
Arguments to pass to the logging formatter. See the standard python logging libraries.
logger_names = List(bounds=(1, None), class_=<class 'str'>, default=['panel'], item_type=<class 'str'>, label='Logger names')
Loggers which will be prompted in the debugger terminal.
- class panel.widgets.debugger.DebuggerButtons(*, clears, debug_name, terminal_output, loading, align, aspect_ratio, css_classes, design, height, height_policy, margin, max_height, max_width, min_height, min_width, sizing_mode, styles, stylesheets, tags, visible, width, width_policy, name)[source]#
Bases:
ReactiveHTML
Parameter Definitions
Parameters inherited from:
panel.viewable.Layoutable
: align, aspect_ratio, css_classes, design, height, min_width, min_height, max_width, max_height, margin, styles, stylesheets, tags, width, width_policy, height_policy, sizing_mode, visiblepanel.viewable.Viewable
: loadingterminal_output = String(default='', label='Terminal output')
debug_name = String(default='', label='Debug name')
clears = Integer(default=0, inclusive_bounds=(True, True), label='Clears')
- class panel.widgets.debugger.TermFormatter(*args, only_last=True, **kwargs)[source]#
Bases:
Formatter
- format(record)[source]#
Format the specified record as text.
The record’s attribute dictionary is used as the operand to a string formatting operation which yields the returned string. Before formatting the dictionary, a couple of preparatory steps are carried out. The message attribute of the record is computed using LogRecord.getMessage(). If the formatting string uses the time (as determined by a call to usesTime(), formatTime() is called to format the event time. If there is exception information, it is formatted using formatException() and appended to the message.