Skip to main content

hog

Hog helps you specify the files you want to open when looking through your Scribe logs.

PyPI version build status codecov Checked with mypy Code style: black

Install

pip3 install --upgrade scribehog

Usage

hog [options] logcategory [interval]

Options:
-h, --help Print usage information.
-v, --verbose Verbose logging.
-y, --verify Require user confirmation before printing the selected logs.

logcategory a hyphen-separated list of words or word prefixes to test against the hyphen- or underscore-separated logcategory names.
For example: if your logcategory is called alpha_bravo_charlie, you can match it with alpha-bravo-charlie, or just al-brav-c, maybe even a-b-c, as long as it's unambigious given the list of all logcategories.
Note that the order of the words does not matter, ie. al-br-ch and ch-br-al are the same.

interval a reference to the file or files you want to read. The default value is -1, meaning the most recent file. You can either use negative numbers as relative references like this, or specify a date and time in the format of hh, dd-hh, mm-dd-hh, or yyyy-mm-dd-hh. For example, you can pass -3 for the third most recent logfile, or 10-09 for the logfile on the 10th at 9:00 AM (note the leading 0 in the hour).

Ranges can also be specified by using a colon, eg. -3:-2 or 10-15:10-18.
Relative and absolute references can be freely mixed, eg. -10:12-31-20.
When omitting a reference from either side of the colon, the end of the list is assumed, just like in Python list slicing, eg. -5:.

You don't have to know if the specified files are gzip-compressed or not, hog takes care of that for you.
The contents are uniformly printed to stdout, so you can pipe the output into grep, less or whatever you need to use.

Development

Make sure you have Python (>=3.5) installed.
Clone the repository, then call make develop.

hog - Photo by Fabian Blank on Unsplash

Release files for scribehog 1.4.3

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

Source distribution (sdist)

Source distribution for scribehog 1.4.3
File Size Uploaded
scribehog-1.4.3.tar.gz 8.0 kB Details

Built distribution (wheel)

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

Total release size: 21.1 kB

Release files / scribehog-1.4.3.tar.gz

Download URL scribehog-1.4.3.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d0ae9abf7a6b7a52557f683e93c91109f383c370c8aaa057c195f84e3f1075b0
BLAKE2b-256 checksum
How to use checksums
a8a3a02a3b444ca6c43865066a24cd91e5a55681570b735afb68acb6ec5983b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

Release files / scribehog-1.4.3-py3-none-any.whl

Download URL scribehog-1.4.3-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b0b1eef1c3732fbc9f42efb787c8b306ef669610c86c63e2c3a8d1dcf471acf6
BLAKE2b-256 checksum
How to use checksums
45967632fc57b2954d711e55b5508d2e5107d27cec482d69e0a455632b7762d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

Release history Release notifications | RSS feed

This release

1.4.3 This release

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

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