Skip to main content

No project description provided

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

errgrep-0.0.6.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

errgrep-0.0.6-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file errgrep-0.0.6.tar.gz.

File metadata

  • Download URL: errgrep-0.0.6.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for errgrep-0.0.6.tar.gz
Algorithm Hash digest
SHA256 2b348f94bae13f2fce7b57e6669e8e74b09fdb3b77853e139f867b99396b960d
MD5 906869808fb7fb6a522147a69da6390b
BLAKE2b-256 b93a083a83f44fe30daeb731c4a9ab5d43fbacecb1306d17168cec0dcd4cf133

See more details on using hashes here.

File details

Details for the file errgrep-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: errgrep-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for errgrep-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f1ca04bd4a578eb09aab6b46751f019203838732e248a40241fb4410655deb63
MD5 1f18fb5594067636e8f852c9b28f1b99
BLAKE2b-256 9bcda661470ff546fbfa3b1cc0a6740724c71b71f14055d1188424d43f4bd288

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page