Skip to main content

Run tests PyPI version

errgrep

A cli for grep'ing through log files to find log statements matching a regex. Internally line timestamps, delimit 'log lines'. A line without a timestamp is considered to be part of the prior line. This allows for errgrep to find more complete exceptions (or other events) than just a single line from a file.

Installation

pip install errgrep

Usage

usage: errgrep [-h] [-i] [-a] [-C CONTEXT] regex [files [files ...]]

errgrep helps grep for multi-line statements in log files.

positional arguments:
  regex                 The regex used to search to search for statements.
  files                 Files to search. A "-" corresponds with reading from
                        stdin. If no files are given, will search stdin.

optional arguments:
  -h, --help            show this help message and exit
  -i, --ignore-case     If given, ignore case in search.
  -a, --allow-timestamp-format-changes
                        If given, assume the timestamp format can change
                        within a given file.
  -C CONTEXT, --context CONTEXT
                        If given, the number of lines of context to print
                        around matching lines. Can also be given as -NUM.

Example

errgrep --ignore-case error file.txt

See https://csm10495.github.io/errgrep/ for full API documentation.

License

MIT License

Release files for errgrep 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for errgrep 0.0.6
File Size Uploaded
errgrep-0.0.6.tar.gz 9.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for errgrep 0.0.6
File Interpreter ABI Platform
errgrep-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 21.7 kB

Release files / errgrep-0.0.6.tar.gz

Download URL errgrep-0.0.6.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2b348f94bae13f2fce7b57e6669e8e74b09fdb3b77853e139f867b99396b960d
BLAKE2b-256 checksum
How to use checksums
b93a083a83f44fe30daeb731c4a9ab5d43fbacecb1306d17168cec0dcd4cf133
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Release files / errgrep-0.0.6-py3-none-any.whl

Download URL errgrep-0.0.6-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1ca04bd4a578eb09aab6b46751f019203838732e248a40241fb4410655deb63
BLAKE2b-256 checksum
How to use checksums
9bcda661470ff546fbfa3b1cc0a6740724c71b71f14055d1188424d43f4bd288
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page