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(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
Enum
Enum 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: int, width: int = 1600, height: int = 300, text_font_size: int = 10, text_font: str = 'monospace', enable_dark_scheme: bool = True, max_history: int = -1, long_class_name: bool = True)[source]
Bases:
object
Logger with test text box widget to show logs of test apps
- __init__(doc, log_level: int, width: int = 1600, height: int = 300, text_font_size: int = 10, text_font: str = 'monospace', enable_dark_scheme: bool = True, max_history: int = -1, long_class_name: bool = 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 – log level int, possible values [0, 10, 20, 30, 40, 50]
width – width of the logger box window
height – height of the logger box window
text_font_size – text font size of the log msg in the logger pox
text_font – type of the text font
enable_dark_scheme – use dark scheme for logger box window
max_history – number of items to keep in history, if -1 or 0 endless history is used
long_class_name – 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
- update_data_source(msg: str = '')[source]
This function calculates and updates the position of all log msg, including the new msg if provided