Skip to main content

Pretty Print Log Visualizer

Project description

loghound

This file will become your README and also the index of your documentation.

Developer Guide

If you are new to using nbdev here are some useful pointers to get you started.

Install loghound in Development mode

# make sure loghound package is installed in development mode
$ pip install -e .

# make changes under nbs/ directory
# ...

# compile to have changes apply to loghound
$ nbdev_prepare

Usage

Installation

Install latest from the GitHub repository:

$ pip install git+https://github.com/jjmaturino/loghound.git

or from conda

$ conda install -c jjmaturino loghound

or from pypi

$ pip install loghound

Documentation

Documentation can be found hosted on this GitHub repository’s pages. Additionally you can find package manager specific guidelines on conda and pypi respectively.

How to use

Fill me in please! Don’t forget code examples:

1+1
2
main(config="../example_configs/raft_errors.yaml", logfile="../example_logs/raft.txt", concurrent=True)
┏━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ time    S0                                S1                                S2                               ┃
┡━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ 000000 │ 000000::S0::Starting up          │                                  │                                  │
│ 000000 │                                  │ 000000::S1::Starting up          │                                  │
│ 000000 │                                  │                                  │ 000000::S2::Starting up          │
│ 000001 │ 000001::S0::Election timer       │                                  │                                  │
│        │ started                          │                                  │                                  │
│ 000001 │                                  │ 000001::S1::Election timer       │                                  │
│        │                                  │ started                          │                                  │
│ 000001 │                                  │                                  │ 000001::S2::Election timer       │
│        │                                  │                                  │ started                          │
│ 000045 │                                  │                                  │ 000045::S2::Election timeout     │
│        │                                  │                                  │ elapsed                          │
│ 000046 │                                  │                                  │ 000046::S2::Becoming candidate   │
│        │                                  │                                  │ for term 1                       │
│ 000047 │                                  │                                  │ 000047::S2::Requesting vote from │
│        │                                  │                                  │ S0                               │
│ 000047 │                                  │                                  │ 000047::S2::Requesting vote from │
│        │                                  │                                  │ S1                               │
│ 000052 │ 000052::S0::Granting vote to S2  │                                  │                                  │
│        │ for term 1                       │                                  │                                  │
│ 000053 │                                  │ 000053::S1::Granting vote to S2  │                                  │
│        │                                  │ for term 1                       │                                  │
│ 000054 │                                  │                                  │ 000054::S2::Became leader for    │
│        │                                  │                                  │ term 1                           │
│ 000055 │                                  │                                  │ 000055::S2::Leader, checking     │
│        │                                  │                                  │ heartbeats                       │
│ 000056 │                                  │                                  │ 000056::S2::Sending              │
│        │                                  │                                  │ AppendEntries to S0              │
│ 000056 │                                  │                                  │ 000056::S2::Sending              │
│        │                                  │                                  │ AppendEntries to S1              │
│ 000060 │ 000060::S0::Received             │                                  │                                  │
│        │ AppendEntries from S2            │                                  │                                  │
│ 000060 │                                  │ 000060::S1::Received             │                                  │
│        │                                  │ AppendEntries from S2            │                                  │
│ 000100 │                                  │                                  │ 000100::S2::Received client      │
│        │                                  │                                  │ request: Put(x, 1)               │
│ 000101 │                                  │                                  │ 000101::S2::Appended entry at    │
│        │                                  │                                  │ index 1                          │
│ 000102 │                                  │                                  │ 000102::S2::Replicating entry 1  │
│        │                                  │                                  │ to S0                            │
│ 000102 │                                  │                                  │ 000102::S2::Replicating entry 1  │
│        │                                  │                                  │ to S1                            │
│ 000108 │ 000108::S0::Accepted entry 1     │                                  │                                  │
│        │ from S2                          │                                  │                                  │
│ 000109 │                                  │ 000109::S1::Accepted entry 1     │                                  │
│        │                                  │ from S2                          │                                  │
│ 000110 │                                  │                                  │ 000110::S2::Entry 1 committed    │
│        │                                  │                                  │ (majority reached)               │
│ 000111 │                                  │                                  │ 000111::S2::Applied command      │
│        │                                  │                                  │ Put(x, 1)                        │
│ 000155 │                                  │                                  │ 000155::S2::Leader, checking     │
│        │                                  │                                  │ heartbeats                       │
│ 000156 │                                  │                                  │ 000156::S2::Sending              │
│        │                                  │                                  │ AppendEntries to S0              │
│ 000156 │                                  │                                  │ 000156::S2::Sending              │
│        │                                  │                                  │ AppendEntries to S1              │
│ 000200 │                                  │                                  │ 000200::S2::Received client      │
│        │                                  │                                  │ request: Put(y, 2)               │
│ 000201 │                                  │                                  │ 000201::S2::Appended entry at    │
│        │                                  │                                  │ index 2                          │
│ 000202 │                                  │                                  │ 000202::S2::Replicating entry 2  │
│        │                                  │                                  │ to S0                            │
│ 000202 │                                  │                                  │ 000202::S2::Replicating entry 2  │
│        │                                  │                                  │ to S1                            │
│ 000210 │ 000210::S0::Accepted entry 2     │                                  │                                  │
│        │ from S2                          │                                  │                                  │
│ 000212 │                                  │ 000212::S1::Dropped              │                                  │
│        │                                  │ AppendEntries (simulated network │                                  │
│        │                                  │ loss)                            │                                  │
│ 000213 │                                  │                                  │ 000213::S2::Entry 2 committed    │
│        │                                  │                                  │ (majority reached)               │
│ 000214 │                                  │                                  │ 000214::S2::Applied command      │
│        │                                  │                                  │ Put(y, 2)                        │
│ 000255 │                                  │                                  │ 000255::S2::Leader, checking     │
│        │                                  │                                  │ heartbeats                       │
│ 000256 │                                  │                                  │ 000256::S2::Sending              │
│        │                                  │                                  │ AppendEntries to S0              │
│ 000256 │                                  │                                  │ 000256::S2::Sending              │
│        │                                  │                                  │ AppendEntries to S1              │
│ 000260 │ 000260::S0::Accepted heartbeat   │                                  │                                  │
│        │ from S2                          │                                  │                                  │
│ 000262 │                                  │ 000262::S1::Accepted heartbeat   │                                  │
│        │                                  │ from S2                          │                                  │
│ 000300 │                                  │ 000300::S1::Failed to persist    │                                  │
│        │                                  │ state: disk full                 │                                  │
│ 000301 │                                  │ 000301::S1::Retrying persist in  │                                  │
│        │                                  │ 50ms                             │                                  │
│ 000350 │                                  │ 000350::S1::State persisted      │                                  │
│        │                                  │ successfully                     │                                  │
│ 000400 │                                  │                                  │ 000400::S2::Leader, checking     │
│        │                                  │                                  │ heartbeats                       │
│ 000500 │ 000500::S0::Dropped heartbeat    │                                  │                                  │
│        │ (simulated network loss)         │                                  │                                  │
│ 000501 │                                  │ 000501::S1::Dropped heartbeat    │                                  │
│        │                                  │ (simulated network loss)         │                                  │
│ 000600 │ 000600::S0::Election timeout     │                                  │                                  │
│        │ elapsed                          │                                  │                                  │
│ 000601 │ 000601::S0::Becoming candidate   │                                  │                                  │
│        │ for term 2                       │                                  │                                  │
│ 000602 │ 000602::S0::Requesting vote from │                                  │                                  │
│        │ S1                               │                                  │                                  │
│ 000602 │ 000602::S0::Requesting vote from │                                  │                                  │
│        │ S2                               │                                  │                                  │
│ 000605 │                                  │                                  │ 000605::S2::Stepping down,       │
│        │                                  │                                  │ discovered higher term 2         │
│ 000606 │                                  │ 000606::S1::Granting vote to S0  │                                  │
│        │                                  │ for term 2                       │                                  │
│ 000607 │                                  │                                  │ 000607::S2::Granting vote to S0  │
│        │                                  │                                  │ for term 2                       │
│ 000608 │ 000608::S0::Became leader for    │                                  │                                  │
│        │ term 2                           │                                  │                                  │
│ 000609 │ 000609::S0::Leader, checking     │                                  │                                  │
│        │ heartbeats                       │                                  │                                  │
│ 000610 │ 000610::S0::Sending              │                                  │                                  │
│        │ AppendEntries to S1              │                                  │                                  │
│ 000610 │ 000610::S0::Sending              │                                  │                                  │
│        │ AppendEntries to S2              │                                  │                                  │
│ 000700 │ 000700::S0::Received client      │                                  │                                  │
│        │ request: Get(x)                  │                                  │                                  │
│ 000701 │ 000701::S0::Reading key x = 1    │                                  │                                  │
│ 000702 │ 000702::S0::Responded to client: │                                  │                                  │
│        │ x = 1                            │                                  │                                  │
│ 000800 │ 000800::S0::Starting snapshot at │                                  │                                  │
│        │ index 2                          │                                  │                                  │
│ 000801 │ 000801::S0::Snapshot complete,   │                                  │                                  │
│        │ 128 bytes                        │                                  │                                  │
│ 000802 │ 000802::S0::Sending snapshot to  │                                  │                                  │
│        │ S1                               │                                  │                                  │
│ 000810 │                                  │ 000810::S1::Installed snapshot   │                                  │
│        │                                  │ from S0                          │                                  │
└────────┴──────────────────────────────────┴──────────────────────────────────┴──────────────────────────────────┘

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

loghound-0.0.1.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

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

loghound-0.0.1-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file loghound-0.0.1.tar.gz.

File metadata

  • Download URL: loghound-0.0.1.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for loghound-0.0.1.tar.gz
Algorithm Hash digest
SHA256 eff9c1088972a311e959ebd909b7b3ace98927dde974216e36565753ca88d675
MD5 56b16ddd0ee7427f4782df4264717bd1
BLAKE2b-256 bc581beac4b70028e44319c18c89322d3789828ede24de9e887a9d9872299d3a

See more details on using hashes here.

File details

Details for the file loghound-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: loghound-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for loghound-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 55093145a19739fea2222fb78c37519acff27a79614ce46423a08916287ad47d
MD5 09b897633110e9162a8e098372ad8f5d
BLAKE2b-256 580b5d86150e29908da1de27e32b58f40719f94b1d2d4d4f10ce22e7e2cdd629

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