logsquash
Collapse repeated log lines into counted groups, ignoring the parts that change:
timestamps, IPs, UUIDs, hex ids and numbers. Like sort | uniq -c, but "conn 10.0.0.1 failed
after 30ms" and "conn 10.0.0.9 failed after 45ms" count as the same message. Python 3.9+, stdlib only.
pip install logsquash
logsquash app.log -s # groups by frequency, first example line shown
logsquash app.log -s -m 5 -t # only groups seen >= 5 times, show the normalized template
kubectl logs pod | logsquash -a # only merge consecutive repeats
Output: COUNT line. Exit codes: 0 ok, 2 file error.
Tests
pytest (8 tests).
Support
Free, MIT licensed. If it saved you time: https://paypal.me/RafalBaranowski
Metadata
Release files for logsquash 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| logsquash-0.1.0.tar.gz | 4.3 kB | Without provenance | Details for logsquash-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| logsquash-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for logsquash-0.1.0-py3-none-any.whl |
Total release size: 8.3 kB
Release files / logsquash-0.1.0.tar.gz
| Download URL | logsquash-0.1.0.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb00f3b990cd6a4ee25afb2f021ca9d8a13643c74f52ca6e193f65ab2d84d2e6
|
|
BLAKE2b-256 checksum How to use checksums |
39ae34099d2e854b1b06aeeccc3f96770112e1b90939be6f048b12c2d65996ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Release files / logsquash-0.1.0-py3-none-any.whl
| Download URL | logsquash-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9cd723baeb5cf19ebb6f50e0e1aa85247381ee429ba706c29802798d2e2e0970
|
|
BLAKE2b-256 checksum How to use checksums |
f371980efbb9aed3a5d3ecd23600f031f148a422d7976e819d34147284edbb47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Security for logsquash 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.