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.

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.2.0.tar.gz (5.6 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.2.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for textual_logging-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8667926779ce153b57f5c3d0e084e6ac0295af0a1740b1224d4db75eb7603d58
MD5 93bd17dd1c612ef557162c3a9e2fc34c
BLAKE2b-256 3626759c35d60980ac9251c21270a344ef4fd3dcb355c2f02ab112dca23b3f28

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for textual_logging-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d533346802537ead7452f1ea1c0c9955973a1636986bfbb7ee9f0df80c02d95
MD5 eb784b841d2c9e9939e456bfc999dcce
BLAKE2b-256 274b9b3b5869666551a7b7f43017c48c9db52158a0a0eddb8bf4e7dbb4e8d617

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