Python Logging Handler which dumps in the Trace Event Format supported by Chromium based browsers.
Project description
Logging Handler writing Trace Event Format
This logging writes the logs in the Trace Event Format.
Installation
pip install trace-event-handler
Usage
import logging
from trace_event_handler import TraceEventHandler
handler = TraceEventHandler()
logging.basicConfig(
handlers=[
logging.StreamHandler(None),
handler
]
)
# Do your stuff and log it
# ...
# Dump the trace to file
handler.dump('trace.json')
Open your Chromium based browser and navigate to chrome://tracing
.
Click on Load
and select your dumped trace file.
The example leads to the trace seen in the figure above.
Publishing manually
python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/*
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
Built Distribution
Close
Hashes for trace_event_handler-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c729107cd8b85055242d726f826bfab9ef17bc26cf9907987f4032b450ed458b |
|
MD5 | f2de36a9487c8afcaf97264a6dfc5bfd |
|
BLAKE2b-256 | d2fe6b88eb8c4baa6f779968c4733a977272c3f275beb532b70a1d353523c7b1 |
Close
Hashes for trace_event_handler-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb3f7711716f0d18d97284256afdfcb98861d318a0f84bb902adf49cbfa0de92 |
|
MD5 | 23fcc23d311af413d131904222525359 |
|
BLAKE2b-256 | 392071e5286bcb094ae503a7c41e0524d40edec5f7a2564a6f0f897a86c15877 |