shyft.dashboard.widgets.logger_box¶
Classes
|
Enum with log levels from logging module |
|
Logger with test text box widget to show logs of test apps |
- class shyft.dashboard.widgets.logger_box.LogLevel(*values)[source]¶
Bases:
EnumEnum with log levels from logging module
- CRITICAL = 50¶
- ERROR = 40¶
- WARNING = 30¶
- INFO = 20¶
- DEBUG = 10¶
- NOTSET = 0¶
- class shyft.dashboard.widgets.logger_box.LoggerBox(doc, log_level, width=1600, height=300, text_font_size=10, text_font='monospace', enable_dark_scheme=True, max_history=-1, long_class_name=True)[source]¶
Bases:
objectLogger with test text box widget to show logs of test apps
If used in bokeh async function without document lock, extra=dict(async_on=True) needs to be provided as kwargs in logging call.
Examples
self.logger.debug(“example msg”, extra=dict(async_on=True))
- Parameters:
doc – Bokeh document
log_level (int) – log level int, possible values [0, 10, 20, 30, 40, 50]
width (int) – width of the logger box window
height (int) – height of the logger box window
text_font_size (int) – text font size of the log msg in the logger pox
text_font (str) – type of the text font
enable_dark_scheme (bool) – use dark scheme for logger box window
max_history (int) – number of items to keep in history, if -1 or 0 endless history is used
long_class_name (bool) – display the full class instance
- __init__(doc, log_level, width=1600, height=300, text_font_size=10, text_font='monospace', enable_dark_scheme=True, max_history=-1, long_class_name=True)[source]¶
If used in bokeh async function without document lock, extra=dict(async_on=True) needs to be provided as kwargs in logging call.
Examples
self.logger.debug(“example msg”, extra=dict(async_on=True))
- Parameters:
doc – Bokeh document
log_level (int) – log level int, possible values [0, 10, 20, 30, 40, 50]
width (int) – width of the logger box window
height (int) – height of the logger box window
text_font_size (int) – text font size of the log msg in the logger pox
text_font (str) – type of the text font
enable_dark_scheme (bool) – use dark scheme for logger box window
max_history (int) – number of items to keep in history, if -1 or 0 endless history is used
long_class_name (bool) – display the full class instance
- get_class_from_frame(fr)[source]¶
This function tries to find the name of the class which function send the log msg
- property layout_components¶
This property returns the layout components
- callback_fontsize(attrn, old, text_font_size)[source]¶
This function sets a new fontsize
- Return type:
None
- update_data_source(msg='')[source]¶
This function calculates and updates the position of all log msg, including the new msg if provided
- Parameters:
msg (str)