taskbridgeapp.gui.viewmodel.threadedtasks.LoggingThread
- class taskbridgeapp.gui.viewmodel.threadedtasks.LoggingThread(logging_level, log_stdout=False, log_file=True, log_gui=True)
Bases:
QThreadUsed to collect logs.
Methods
Keeps the logging thread running until it is stopped.
Changes the logging level.
Sets up the logging system as configured in the constructor.
Attributes
__display_name____name____orig_bases____sphinx_decorator_args____sphinx_mock__When set, causes this thread to stop.
- __call__(*args, **kwargs)
Call self as a function.
- Return type:
Any
- __init__(logging_level, log_stdout=False, log_file=True, log_gui=True)
Initialises the logging thread.
- Parameters:
logging_level (
str) – the logging level which can be DEBUG, INFO, WARNING or CRITICAL.log_stdout (
bool) – if True, logs are sent to standard out.log_file (
bool) – if True, logs are sent to file.log_gui (
bool) – if True, logs are sent to a function which handles displaying logs in the GUI.
- log_signal
Log messages are emitted to this signal.
alias of
str
- run()
Keeps the logging thread running until it is stopped.
- Return type:
None
- set_logging_level(logging_level)
Changes the logging level.
- Parameters:
logging_level (
str) – the desired logging level.- Return type:
None
- setup_logging()
Sets up the logging system as configured in the constructor.
- Return type:
None
- stop_logging = <threading.Event at 0x7e57e92e1820: unset>
When set, causes this thread to stop.