Skip to content

jjmaturino/loghound

Repository files navigation

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                          │                                  │
└────────┴──────────────────────────────────┴──────────────────────────────────┴──────────────────────────────────┘

About

Pretty Print Log Visualizer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors