scistag.vislog.visual_log_mock.VisualMicroLock¶
- class VisualMicroLock(log_to_std_out=True)[source]¶
Bases:
objectVisualMicroLock is a replacement for the VisualLogBuilder class of the SciStag Python package to easily port an application using VirtualLog for logging to platforms which are not capable of loading of the full SciStag library such as MicroPython.
Tries to wrap all common commands to a simple log to stdout operation as good as possible.
- Parameters
log_to_std_out – Defines if all simple logging shall be directed to stdout.
Methods
Inserts a simple line break
Logs a critical error
Logs an info text
Logs an info text
figure- rtype
Finalizes the log
image- rtype
Logs an info text
Logs text to stdout
Inserts a page break
Stores the VisualMicroLock class in the defined directory so it can easily be imported.
Adds a table to the log.
Replacement for
VisualLogBuilder.text()and all similar functions.Logs an info text
Attributes
__dict____doc____module____weakref__list of weak references to the object (if defined)
Returns if this builder is a log with limited functionality for MicroPython.
Replacement for
VisualLogBuilder.title()Replacement for
VisualLogBuilder.sub()Replacement for
VisualLogBuilder.sub_x3()Replacement for
VisualLogBuilder.sub_x4()Replacement for
VisualLogBuilder.sbu_test()Replacement for
VisualLogBuilder.md()Replacement for
VisualLogBuilder.html()Defines if the simple output shall be directed to stdout
- critical(*args, **_)[source]¶
Logs a critical error
- Parameters
args – The elements to log. Will be separated by space.
- Return type
- debug(*args, **_)[source]¶
Logs an info text
- Parameters
args – The elements to log. Will be separated by space.
- Return type
- error(*args, **_)[source]¶
Logs an info text
- Parameters
args – The elements to log. Will be separated by space.
- Return type
- info(*args, **_)[source]¶
Logs an info text
- Parameters
args – The elements to log. Will be separated by space.
- Return type
- log_text(*args, **_)[source]¶
Logs text to stdout
- Parameters
args – The elements to log. Will be separated by space.
- Return type
- static setup_micro_lock(target_path='./')[source]¶
Stores the VisualMicroLock class in the defined directory so it can easily be imported. Call this once in a new project.
- Parameters
target_path (
str) – The path at which the Python files shall be stored.
- table(data, *_, **__)[source]¶
Adds a table to the log.
- Parameters
data – A list of rows of which each row contains the same count of columns. The content has to be convertible to a string.
_ –
__ –
- Return type
- Returns
- text(text, *args, **kwargs)[source]¶
Replacement for
VisualLogBuilder.text()and all similar functions. Suppresses all parameters except the text.- Parameters
text (
str) – The text to be logged- Returns
self
- warning(*args, **_)[source]¶
Logs an info text
- Parameters
args – The elements to log. Will be separated by space.
- Return type
- html¶
Replacement for
VisualLogBuilder.html()
- property is_micro: bool¶
Returns if this builder is a log with limited functionality for MicroPython.
- Return type
- Returns
True if it is a minimalistic lock
- log_to_stdout¶
Defines if the simple output shall be directed to stdout
- md¶
Replacement for
VisualLogBuilder.md()
- sub¶
Replacement for
VisualLogBuilder.sub()
- sub_test¶
Replacement for
VisualLogBuilder.sbu_test()
- sub_x3¶
Replacement for
VisualLogBuilder.sub_x3()
- sub_x4¶
Replacement for
VisualLogBuilder.sub_x4()
- title¶
Replacement for
VisualLogBuilder.title()