Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: JKincorperated/ssvlogger
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.0.2
Choose a base ref
...
head repository: JKincorperated/ssvlogger
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Dec 22, 2023

  1. Copy the full SHA
    b621a5f View commit details
  2. Update version

    JKincorperated committed Dec 22, 2023
    Copy the full SHA
    146c87f View commit details
  3. Make pylint shut up

    JKincorperated committed Dec 22, 2023
    Copy the full SHA
    b9e2b7a View commit details

Commits on Dec 23, 2023

  1. Copy the full SHA
    f54f040 View commit details
  2. Copy the full SHA
    7d30d4b View commit details
  3. Add error handling

    JKincorperated committed Dec 23, 2023
    Copy the full SHA
    2456f3f View commit details
  4. Update pyproject.toml

    JKincorperated committed Dec 23, 2023
    Copy the full SHA
    36b0170 View commit details

Commits on Mar 2, 2024

  1. Update README.md

    JKincorperated authored Mar 2, 2024
    Copy the full SHA
    df4e039 View commit details
  2. Copy the full SHA
    fb3a9cb View commit details
  3. Make pylint shut up

    JKincorperated committed Mar 2, 2024
    Copy the full SHA
    1949b68 View commit details
  4. Copy the full SHA
    3d70495 View commit details
  5. Update pyproject.toml

    JKincorperated committed Mar 2, 2024
    Copy the full SHA
    39dcc80 View commit details

Commits on Jul 1, 2024

  1. Copy the full SHA
    01ef255 View commit details
  2. Fix slight issue.

    JKincorperated committed Jul 1, 2024
    Copy the full SHA
    f4e73df View commit details
  3. Make pylint shut up

    JKincorperated committed Jul 1, 2024
    Copy the full SHA
    8f11212 View commit details
  4. Copy the full SHA
    54b34cd View commit details
  5. Fixes

    JKincorperated committed Jul 1, 2024
    Copy the full SHA
    9942cb3 View commit details
  6. Update version

    JKincorperated committed Jul 1, 2024
    Copy the full SHA
    47e9534 View commit details

Commits on Sep 25, 2024

  1. V2 support

    JKincorperated committed Sep 25, 2024
    Copy the full SHA
    9c31298 View commit details
  2. bump version

    JKincorperated committed Sep 25, 2024
    Copy the full SHA
    fd01627 View commit details

Commits on Oct 8, 2024

  1. Copy the full SHA
    968605a View commit details
  2. Make pylint shush

    JKincorperated committed Oct 8, 2024
    Copy the full SHA
    cc539ed View commit details

Commits on Jan 28, 2025

  1. Copy the full SHA
    251fea0 View commit details
  2. Bump version

    JKincorperated committed Jan 28, 2025
    Copy the full SHA
    be6164d View commit details

Commits on Feb 27, 2025

  1. Copy the full SHA
    7fd31ec View commit details
  2. Linting

    JKincorperated committed Feb 27, 2025
    Copy the full SHA
    fce0e80 View commit details
  3. Moar linting

    JKincorperated committed Feb 27, 2025
    Copy the full SHA
    318deff View commit details
  4. Testing

    JKincorperated committed Feb 27, 2025
    Copy the full SHA
    c74d873 View commit details
  5. Fixes

    JKincorperated committed Feb 27, 2025
    Copy the full SHA
    aa875bb View commit details
  6. Bump version

    JKincorperated committed Feb 27, 2025
    Copy the full SHA
    a851405 View commit details
Showing with 460 additions and 222 deletions.
  1. +10 −17 README.md
  2. +3 −3 pyproject.toml
  3. +447 −202 src/ssvlogger/logger.py
27 changes: 10 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -15,28 +15,20 @@ python3 -m pip install ssvlogger

## How to use

### Configure the SSV docker container to use journal for logging
In both cases omit the `-f` to process all available logs, not just follow the current logs.

To tell docker to use journal as its log engine you can append `--log-driver=journald` to the docker run command.
### With docker

This is an example command you could use
`docker logs -f ssv_node | ssvlogger`

```bash
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
```
### Without docker

If you do not use docker it will only work as a service, assuming you have a service called "ssv_node" you should run
`journalctl -u ssv_node -f | ssvlogger -j`

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`
Or you could use:

To use the logger you can pipe the output into the python script using:
`journalctl CONTAINER_NAME=ssv_node -f | ssvlogger`
`journalctl -u ssv_node -f --output cat | ssvlogger`

## Additional Flags

@@ -46,3 +38,4 @@ You can also use different flags to disable or enable certain features in the sc
|-|-|-|
|**-n**|--no-spam|Disables connection and registry event logs
|**-t**|--traceback|Shows tracebacks for errors
|**-j**|--journal|
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -4,17 +4,17 @@ build-backend = "setuptools.build_meta"

[project]
name = "ssvlogger"
version = "1.0.2"
version = "1.6.0"
description = "A simple python package to parse SSV node logs and make them legible"
readme = "README.md"
requires-python = ">=3.8"
license = { file="LICENSE" } # Assuming the license is in a file named LICENSE
authors = [
{ name = "JKinc", email = "your.email@example.com" }, # Added author email from setup.py
{ name = "JKinc"},
]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License", # Check classifier format as it might be incorrect
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
]
keywords = ["SSV", "logging"]
Loading