This project has been archived by its maintainers, and is no longer receiving any updates.
Unmaintained: I’m no longer maintaining this package because I am no longer using Logentries. If you want to continue its maintenance please contact me.
Stream your logs from Logentries on the commandline. Provides the logentries command which makes it easy to call their Download API and pipe it around.
Setting up
Install it:
$ pip install logentries-cli
Find your Logentries account key. At time of writing, this can be found at Accounts->Profile and appears when you press the “Show” button:
(Optional) store your account key in the environment variable LOGENTRIES_ACCOUNT_KEY. You could set this up in e.g. your bashrc. Your other option is to always pass it to logentries with --account-key.
Filter your logs! Run with the syntax:
$ logentries <logset> <logname> [-f filter] [-s start] [-e end]
Verbose help for the options is provided with logentries -h.
Examples
$ logentries web nginx
With only the required arguments (logset and log) filled in, the last 20 minutes of messages from that log are downloaded. They are streamed so they play nicely with other commandline utilities.
$ logentries web nginx -f code=500
Passing a Logentries filter means that fewer messages are downloaded and you can analyze faster.
$ logentries web nginx -f 'code=500' -s '1am' -e '5 minutes ago'
A wide variety of date/time formats are supported for specifying the start and end of the time period to fetch messages for, thanks to the awesome parsedatetime and dateutil.
Release files for logentries-cli 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| logentries-cli-1.2.1.tar.gz | 16.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| logentries_cli-1.2.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 33.4 kB
Release files / logentries-cli-1.2.1.tar.gz
| Download URL | logentries-cli-1.2.1.tar.gz |
|---|---|
| Size | 16.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b46550f7cfacd94988c70ff1fedb9fb02b869ed6ee5ba399fe4112eba66e4ed7
|
|
BLAKE2b-256 checksum How to use checksums |
5aa06f7d597da98ff01a43de6b2260fa25d85286a0528e47f9dc2e492c41fc27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
|
Release files / logentries_cli-1.2.1-py2.py3-none-any.whl
| Download URL | logentries_cli-1.2.1-py2.py3-none-any.whl |
|---|---|
| Size | 16.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
136f64e1ad8d97e9dc1da1727eb008d14e2868e1584843a48bad545f3327a302
|
|
BLAKE2b-256 checksum How to use checksums |
4e782f2abfe810b3926affee74d3508f180f57a1ce97ce1d1ca10e270f5195c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
|