Handlr | Without the 'e'
Created by Joe Tilsed | Created 11/10/2022 | Last Updated: 11/10/2022 | Current Version: 0.1.0
Handlr is a Python handler to logging services, i.e. Logstash as part of the ELK stack.
How to install
Simply run: pip install handlr.
How to use
An example would be to use this package for a logstash as part of the ELK stack.
import logging
from handlr import Handler
LOGGER_ENDPOINT = 'localhost'
LOGGER_PORT = 5040
LOG_LEVEL = 'DEBUG'
LOG_LABEL = 'VM_123ABC'
LOG_TAGS = ['virtual-machine', 'workers', 'EMEA']
log = logging.getLogger(__name__)
handler = Handler(LOGGER_ENDPOINT, LOGGER_PORT, LOG_LABEL, LOG_TAGS)
log.addHandler(handler)
# If you don't want the logs being shown to the console (aka only shown on ELK stack) then remove the below line.
log.addHandler(logging.StreamHandler())
log.setLevel(LOG_LEVEL)
log.info(f"Setup log, log level {LOG_LEVEL}. Sending logs to {LOGGER_ENDPOINT}:{LOGGER_PORT}.")
Enjoy!
# That's all folks...
Metadata
Release files for handlr 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 | |
|---|---|---|---|---|
| handlr-0.1.0.tar.gz | 5.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| handlr-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.6 kB
Release files / handlr-0.1.0.tar.gz
| Download URL | handlr-0.1.0.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f85c5961d00108a24096ca372349dc5e1cb70cc3b3ab6c622a4229174e75f20
|
|
BLAKE2b-256 checksum How to use checksums |
b81e58abcee4707b6d1e4d0f63772f845d18ab4daaf88b51673f7a5156e395a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.0
|
Release files / handlr-0.1.0-py3-none-any.whl
| Download URL | handlr-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3e28e29ac13f014d2572dc6a0c5d1ee5cea5c0643447ec641ffcebd5c93ffeab
|
|
BLAKE2b-256 checksum How to use checksums |
785d21de4f221c191ca0e7bc392aafe333916c1e4ec301432b511fe75e5e2784
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.0
|
Security for handlr 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.