Skip to main content

Python Logging Handler which dumps in the Trace Event Format supported by Chromium based browsers.

Project description

PyPI - Python Version PyPI PyPI - License PyPI - Downloads Python package

Logging Handler writing Trace Event Format

This logging writes the logs in the Trace Event Format.

Screenshot

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

trace_event_handler-0.0.4.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

trace_event_handler-0.0.4-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file trace_event_handler-0.0.4.tar.gz.

File metadata

  • Download URL: trace_event_handler-0.0.4.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.5

File hashes

Hashes for trace_event_handler-0.0.4.tar.gz
Algorithm Hash digest
SHA256 2b5c29f128213daea0f159a579270a59da32eba90d0a5c1814a8b0ac920549cc
MD5 18f898bcc7c66666a9e78bf39b444a1a
BLAKE2b-256 48e5d3cf9bccac9614cfd26a4e193f973ed90f89bb369330d095bb5322b53757

See more details on using hashes here.

File details

Details for the file trace_event_handler-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: trace_event_handler-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.5

File hashes

Hashes for trace_event_handler-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fc67665a95ea89ec99fd0150ae6bbfe5cf81e9e34df4289cca05f70b6764d72c
MD5 57b4a35d09976fe663eb68d2d789a122
BLAKE2b-256 1ebc8732ef3881a4826fd4f76827ff6f9d5970e3d6244f376d76454e71d270dc

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