The goal of textual_logging.Logging widget is to display log from python logging library inside a textual application.
The records are saved in order to change format later and to speedup display.
The logger can be specified when instanciating the widget. By default the root logger is used. This allow to have multiple widget on the same application showing different logger.
The logger can use any formatter.
The logger must have a textual_logging.LoggingHandler handler.
The packet is on pypi. To install it use pip install textual_logging.
The file runner.py contain a example application textual_logging.TextualLogger that use the widget.
It also conain a function textual_logging.run that can be used directly with a Callable.
The file demo.py show a basic usage.
Run:
python3 -m textual_loggingit will log 10'000 messages in each severity.
You can press t to show/hide log record time.
You can press l to show/hide log record level.
You can press m to show/hide log record message.
You can press c to clear the logs.
You can press s to change severity.
To exit, press Ctrl + q.