Skip to main content

A logging widget for Textual applications to display Python logging records

Project description

Textual widget to display python logging log entry

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.

Install

The packet is on pypi. To install it use pip install textual_logging.

Example

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.

Demo

Run:

python3 -m textual_logging

it 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

textual_logging-0.3.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

textual_logging-0.3.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file textual_logging-0.3.0.tar.gz.

File metadata

  • Download URL: textual_logging-0.3.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for textual_logging-0.3.0.tar.gz
Algorithm Hash digest
SHA256 4e674a454c721b9329b2e5bb2dd32741195e1d13fdae9f8c6023f042bfd1481b
MD5 f67c64edd141e47225b7725aa4106378
BLAKE2b-256 b95f7bf0d8e65d5dab3bdfb8855b1f51c380eb3a3380e8fe67a101d23e261179

See more details on using hashes here.

File details

Details for the file textual_logging-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for textual_logging-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 148101ca46ee5b3dd54a176846d7b935390cfbd4be226be232026383ad5ca338
MD5 3408c37808773294bed3ea8b71b4b5fb
BLAKE2b-256 ee8a0a97aaffb154044a3c581db724db0a550cf2cfc80799cb47d9b34a3d8c9a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page