Skip to main content

Render Eliot logs as an ASCII tree

Project description

Render Eliot logs as an ASCII tree.

This output:

$ python eliottree.py < eliot.log
f3a32bb3-ea6b-457c-aa99-08a3d0491ab4
    +-- app:soap:client:request@1/started
        |-- dump: /home/user/dump_files/20150303/1425356936.28_Client_req.xml
        |-- soapAction: a_soap_action
        |-- timestamp: 2015-03-03 06:28:56.278875
        `-- uri: http://example.org/soap
    +-- app:soap:client:success@2,1/started
        `-- timestamp: 2015-03-03 06:28:57.516579
        +-- app:soap:client:success@2,2/succeeded
            |-- dump: /home/user/dump_files/20150303/1425356937.52_Client_res.xml
            `-- timestamp: 2015-03-03 06:28:57.517077
    +-- app:soap:client:request@3/succeeded
        |-- status: 200
        `-- timestamp: 2015-03-03 06:28:57.517161

89a56df5-d808-4a7c-8526-e603aae2e2f2
    +-- app:soap:service:request@1/started
        |-- dump: /home/user/dump_files/20150303/1425357068.03_Service_req.xml
        |-- soapAction: method
        |-- timestamp: 2015-03-03 06:31:08.032091
        `-- uri: /endpoints/soap/method
    +-- app:soap:service:success@2,1/started
        `-- timestamp: 2015-03-03 06:31:11.512330
        +-- app:soap:service:success@2,2/succeeded
            |-- dump: /home/user/dump_files/20150303/1425357071.51_Service_res.xml
            `-- timestamp: 2015-03-03 06:31:11.513453
    +-- app:soap:service:request@3/succeeded
        |-- status: 200
        `-- timestamp: 2015-03-03 06:31:11.513992

was generated from:

{"dump": "/home/user/dump_files/20150303/1425356936.28_Client_req.xml", "timestamp": 1425356936.278875, "uri": "http://example.org/soap", "action_status": "started", "task_uuid": "f3a32bb3-ea6b-457c-aa99-08a3d0491ab4", "action_type": "app:soap:client:request", "soapAction": "a_soap_action", "task_level": [1]}
{"timestamp": 1425356937.516579, "task_uuid": "f3a32bb3-ea6b-457c-aa99-08a3d0491ab4", "action_type": "app:soap:client:success", "action_status": "started", "task_level": [2, 1]}
{"task_uuid": "f3a32bb3-ea6b-457c-aa99-08a3d0491ab4", "action_type": "app:soap:client:success", "dump": "/home/user/dump_files/20150303/1425356937.52_Client_res.xml", "timestamp": 1425356937.517077, "action_status": "succeeded", "task_level": [2, 2]}
{"status": 200, "task_uuid": "f3a32bb3-ea6b-457c-aa99-08a3d0491ab4", "task_level": [3], "action_type": "app:soap:client:request", "timestamp": 1425356937.517161, "action_status": "succeeded"}
{"dump": "/home/user/dump_files/20150303/1425357068.03_Service_req.xml", "timestamp": 1425357068.032091, "uri": "/endpoints/soap/method", "action_status": "started", "task_uuid": "89a56df5-d808-4a7c-8526-e603aae2e2f2", "action_type": "app:soap:service:request", "soapAction": "method", "task_level": [1]}
{"timestamp": 1425357071.51233, "task_uuid": "89a56df5-d808-4a7c-8526-e603aae2e2f2", "action_type": "app:soap:service:success", "action_status": "started", "task_level": [2, 1]}
{"task_uuid": "89a56df5-d808-4a7c-8526-e603aae2e2f2", "action_type": "app:soap:service:success", "dump": "/home/user/dump_files/20150303/1425357071.51_Service_res.xml", "timestamp": 1425357071.513453, "action_status": "succeeded", "task_level": [2, 2]}
{"status": 200, "task_uuid": "89a56df5-d808-4a7c-8526-e603aae2e2f2", "task_level": [3], "action_type": "app:soap:service:request", "timestamp": 1425357071.513992, "action_status": "succeeded"}

Usage

usage: eliottree.py [-h] [-u UUID] [-i KEY] [--raw] [FILE [FILE ...]]

Display an Eliot log as a tree of tasks.

positional arguments:
  FILE                  Files to process

optional arguments:
  -h, --help            show this help message and exit
  -u UUID, --task-uuid UUID
                        Select a specific task by UUID
  -i KEY, --ignore-task-key KEY
                        Ignore a task key, use multiple times to ignore
                        multiple keys. Defaults to ignoring most Eliot
                        standard keys.
  --raw                 Do not format some task values (such as timestamps) as
                        human-readable

Contribute

See https://github.com/jonathanj/eliottree for details.

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

eliot-tree-15.0.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

eliot_tree-15.0.0-py2-none-any.whl (5.1 kB view details)

Uploaded Python 2

File details

Details for the file eliot-tree-15.0.0.tar.gz.

File metadata

  • Download URL: eliot-tree-15.0.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for eliot-tree-15.0.0.tar.gz
Algorithm Hash digest
SHA256 3e00a977571d91057d98181b06f4470b3681bfc8c4e90597110a147d30dba6ed
MD5 b3aed1b9b4b1660cb6b739a991d5fd46
BLAKE2b-256 96e2cbb65903f2e6a2290e6ca8bc5a623b02cae1cec64192cdfc714b53e4f5f8

See more details on using hashes here.

Provenance

File details

Details for the file eliot_tree-15.0.0-py2-none-any.whl.

File metadata

File hashes

Hashes for eliot_tree-15.0.0-py2-none-any.whl
Algorithm Hash digest
SHA256 a9f4cc26a2be70db45b3217635641d320fb78b3972c27c4494e989076eba233b
MD5 a6466e2f6e1155535480dbb98ba06555
BLAKE2b-256 5941d2f416042d8f203e52ba09ea82098bb9c4dc8a32331b7314e517314c62f5

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page