A simple python package to parse SSV node logs and make them legible
Project description
SSV logger
A simple tool to make the SSV node's logs easier to view.
Dependencies
- Python3
- Colorama
Installation
# Install dependency
python3 -m pip install colorama
# Download python script to local bin
wget [URL] -O /usr/local/bin/ssvlogger
How to use
Configure the SSV docker container to use journal for logging
To tell docker to use journal as its log engine you can append --log-driver=journald
to the docker run command.
This is an example command you could use
docker run --restart unless-stopped --name ssv_node -e \
CONFIG_PATH=/config.yaml -p 13001:13001 -p 12001:12001/udp -p 15000:15000 \
-v "$(pwd)/config.yaml":/config.yaml \
-v "$(pwd)":/data \
-v "$(pwd)/password":/password \
-v "$(pwd)/encrypted_private_key.json":/encrypted_private_key.json \
--log-driver=journald \ # This is to set up journal as the logging handler for docker
-it "bloxstaking/ssv-node:latest" make BUILD_PATH="/go/bin/ssvnode" start-node
After you have configure docker, you can view live logs from the SSV node with this command (assuming you have named the container "ssv_node"):
journalctl CONTAINER_NAME=ssv_node -f
To use the logger you can pipe the output into the python script using:
journalctl CONTAINER_NAME=ssv_node -f | ssvlogger
Additional Flags
You can also use different flags to disable or enable certain features in the script
short command | long command | description |
---|---|---|
-n | --no-spam | Disables connection and registry event logs |
-t | --traceback | Shows tracebacks for errors |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ssvlogger-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa143f97722518a1711d684860432dc0b5d88646be7cff6da2db64b582408748 |
|
MD5 | 38ac19fbc5022eb3ecbf236a959818fb |
|
BLAKE2b-256 | 865b899793578d7ecdc0e78be8dea341d4a6adae0f0a576ab22d339fbd77c062 |