Minimalistic Elasticsearch logging handler
Project description
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.
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
Built Distribution
Close
Hashes for elasticsearch-logging-handler-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bb96f665b35aa46c33a7204adbcbd43a37895478ba11a8565c61d4bbe105a31 |
|
MD5 | e90aec70768eee718f7708e3ae046dc8 |
|
BLAKE2b-256 | 9e3ac03e8df9ef1d6fa6ed2bd9cde95f4f350e9346414f8a949e43260a83493b |
Close
Hashes for elasticsearch_logging_handler-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b99c2ab7d64d756f7ef4d631d55e887b354ebd64d6577ba4b348cfba63666065 |
|
MD5 | 88a3b84031912472985a4ecab5ba83f9 |
|
BLAKE2b-256 | 0f62acbf0fd217a44eaec7535ec2b0e5a94d7ed3266d6c07f39268afd1155f27 |