Metadata-Version: 2.4
Name: logxpy
Version: 0.2.1
Summary: Logging library that tells you why it happened
Home-page: https://github.com/logxpy/logxpy/
Maintainer: logxpy Team
Maintainer-email: 
License: Apache 2.0
Keywords: logging
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: System :: Logging
Requires-Python: >=3.9.0
License-File: LICENSE
Requires-Dist: zope.interface
Requires-Dist: pyrsistent>=0.11.8
Requires-Dist: boltons>=19.0.1
Requires-Dist: orjson; implementation_name == "cpython"
Provides-Extra: journald
Requires-Dist: cffi>=1.1.2; extra == "journald"
Provides-Extra: test
Requires-Dist: hypothesis>=1.14.0; extra == "test"
Requires-Dist: testtools; extra == "test"
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-xdist; extra == "test"
Provides-Extra: dev
Requires-Dist: setuptools>=40; extra == "dev"
Requires-Dist: twine>=1.12.1; extra == "dev"
Requires-Dist: coverage; extra == "dev"
Requires-Dist: sphinx; extra == "dev"
Requires-Dist: sphinx_rtd_theme; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: black; extra == "dev"
Dynamic: classifier
Dynamic: description
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: maintainer
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

logxpy: Structured Logging with Action Tracing
===============================================

**logxpy** is a Python logging library that outputs structured, actionable logs
tracing causal chains of actions—helping you understand *why* things happened
in your application.

Why logxpy?
-----------

Python's built-in ``logging`` and similar systems output a stream of factoids:
they're interesting, but hard to trace.

* Why is your application slow?
* What caused this code path to be chosen?
* Why did this error happen?

Standard logging can't answer these questions easily.

With **logxpy**, you get **causal chains of actions**: actions can spawn other
actions, and eventually they either **succeed or fail**. The resulting logs tell
you the story of what your software did.

Features
--------

* **Structured Logging** - JSON output for easy parsing and analysis
* **Action Tracing** - Track operations from start to finish with timing
* **Hierarchical Tasks** - Nested actions show the full call chain
* **Python 3.12+ Ready** - Built with modern Python features
* **Async Support** - Works with asyncio and async/await patterns
* **Type Safety** - Full type hints throughout

Quick Start
-----------

Install logxpy::

    pip install logxpy

Basic usage::

    from logxpy import start_action, Message, to_file

    # Output to a file
    to_file(open("app.log", "w"))

    # Log messages
    Message.log(message_type="app:startup", version="1.0.0")

    # Trace actions
    with start_action(action_type="http:request", method="POST", path="/api/users"):
        with start_action(action_type="database:query", table="users"):
            Message.log(message_type="database:result", rows=10)

Output is structured JSON that's easy to parse, visualize, and analyze.

Viewing Logs
------------

Use the companion ``logxpy-cli-view`` package to render logs as beautiful
colored trees::

    pip install logxpy-cli-view
    logxpy-cli-view app.log

Or use the standalone viewer from the examples::

    python examples-log-view/view_tree.py app.log

Requirements
------------

* Python 3.9 or newer (including PyPy3)

Links
-----

* `Documentation <https://github.com/logxpy/logxpy/>`_
* `Issue Tracker <https://github.com/logxpy/logxpy/issues>`_

License
-------

Apache 2.0 License
