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.1.0.tar.gz (5.4 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.1.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: textual_logging-0.1.0.tar.gz
  • Upload date:
  • Size: 5.4 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.1.0.tar.gz
Algorithm Hash digest
SHA256 c2c11ebc1dff5e9485a2f2533a810b6089384f99a1c8cb9ab644704e7d0a3268
MD5 c366112dc883c6d1aacc8109e96e1bc7
BLAKE2b-256 829c13ce96f1d03daac908d12c822cb5dee11aa502b9c15e9f10047e00a72ba6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for textual_logging-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 57fe5e5d93da2f74213047e1100ea2d3aac88e66da2fead1c6bb18877f7e7d05
MD5 5acbd49669371f70f8e95180e263f4cf
BLAKE2b-256 54793832074108fa589daa21b7197eff0c73b1cd4a11cc21ecd061aed741684f

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