Eliot is a structured logging library for Python designed to capture causality in distributed systems. It allows you to log actions as trees, showing what caused what, and integrates with serialization formats like JSON. Current version 1.17.5, requires Python >=3.9.0. Maintained actively with minor releases every few months.
pip install eliotVerified import paths — ran on the pinned version, not inferred.
Initialize Eliot with to_file() and use start_action context managers to log nested actions.
Use eliot.logging.bridge_logging() to bridge standard logging into Eliot, or set up Eliot as the sole logging system.
Replace log_output = sys.stdout with to_file(log_output) in your initialization code. For JSON lines, use to_file(sys.stdout, format='json').
Always use 'with start_action(...) as action:' and avoid calling start_action without entering the context.
Replace from eliot.parse import parse_logs with manual JSON parsing or switch to the external eliot-tree package.
Run 'pip install eliot' to install the package.
Provide a file-like object, e.g., to_file(sys.stderr) or to_file(open('log.json', 'w')).Use the eliot-tree CLI tool or parse JSON lines manually with json.loads.
No dependency data recorded yet.