elasticsearch-logging-handler
This is a minimalistic Elasticsearch logging handler for python. This handler uses only url as an authentication method. For more robust authentication consider CMRESHandler.
Package on PyPI - https://pypi.org/project/elasticsearch-logging-handler/
Parameters for ElasticHandler:
| Name | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| host | str | True | - | Url for Elasticsearch cluster. Currently, this handler support only basic authentication through providing user and password in the url. | https://user:password@my-cluster.es:9200, https://my-cluster.es:9200 |
| index | str | True | - | Name of the Index to write in. | preprocessing-logs |
| level | int | False | 0 (NOTSET) | Minimal logging level for the handler. Handler will only process messages with level larger than this parameter. | 20, logging.WARNING |
| batch_size | int | False | 1000 | Size of the buffer that stores logs before sending to Elasticsearch. If buffer is full, send batch immediately, without waiting for the flush_period | 2000 - send batches of maximum size 2000 |
| flush_period | float | False | 1.0 | Period during which handler will accumulate logs into batch before sending it ot the cluster. | 10.0 - wait 10 seconds before sending |
| timezone | str | False | None | Timezone for which to transform @timestamp for the record. | 'Europe/Amsterdam', 'Australia/Sydney' |
ElasticHandler is nonblocking, meaning any logging call e.g. logging.exception will not block calling thread. which is useful in the case of high logging load.
Metadata
Release files for elasticsearch-logging-handler 1.0.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 | |
|---|---|---|---|
| elasticsearch-logging-handler-1.0.1.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| elasticsearch_logging_handler-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.4 kB
Release files / elasticsearch-logging-handler-1.0.1.tar.gz
| Download URL | elasticsearch-logging-handler-1.0.1.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9bb96f665b35aa46c33a7204adbcbd43a37895478ba11a8565c61d4bbe105a31
|
|
BLAKE2b-256 checksum How to use checksums |
9e3ac03e8df9ef1d6fa6ed2bd9cde95f4f350e9346414f8a949e43260a83493b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.10
|
Release files / elasticsearch_logging_handler-1.0.1-py3-none-any.whl
| Download URL | elasticsearch_logging_handler-1.0.1-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b99c2ab7d64d756f7ef4d631d55e887b354ebd64d6577ba4b348cfba63666065
|
|
BLAKE2b-256 checksum How to use checksums |
0f62acbf0fd217a44eaec7535ec2b0e5a94d7ed3266d6c07f39268afd1155f27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.10
|