python-elasticsearch-logger
python-elasticsearch-logger copied to clipboard
Python Elasticsearch handler for the standard python logging framework
For proxy reasons etc, it is necessary to be able to override the default connection_class, the only way to currently achieve that is by accessing the mangled __get_es_client() method. The...
Currently the setup.py will check the Python version using `sys.version_info`. That is not considered good practice and for example will not work with Poetry. The recommendation is then to use...
Hello guys, I made refactor in __get_client_es private function. The improvement was made for new implementation of ES client and decouple of class responsibility the CMRESHandler. Thanks.
I initialise the logger in my python app like this: ``` if log_host == None: self.log = logging self.log.basicConfig(filename='ctime.log',level=logging.INFO,format='%(asctime)s %(message)s') else: handler = CMRESHandler(hosts=[{'host': log_host, 'port': int(log_port)}], auth_type=CMRESHandler.AuthType.NO_AUTH, es_index_name=log_index) self.log...
I have recently switched to using `CMRESHandler` and I encoutered some issues when trying to use `%r` for string formatting. The handler is set up as below: ``` handler =...
Create timeout and retry on timeout parameters in the handler constuructor. Parameters passed to Elasticsearch object, and used while performing bulk_send().
With enum34 installed (due to other dependencies in a common environment) a KeyError is raised doing the _INDEX_FREQUENCY_FUNCION_DICT lookup. ``` self._index_name_func = CMRESHandler._INDEX_FREQUENCY_FUNCION_DICT[self.index_name_frequency] KeyError: 0 ``` This occurs due to...
I cannot make the module work correctly with Elasticsearch 6.3.1, It is failing if I used the code as is, if I removed the line connection_class=RequestsHttpConnection, it works correctly Exception...
Since Elastic 5, elasticsearch offers ingestion pipelines directly in elasticsearch https://www.elastic.co/guide/en/elasticsearch/reference/master/ingest.html For some use cases it would be useful to enable access to this directly from a log handler, e.g....
Hi, I'm using your logger in my application. I've made some changes (modified inherited CMRESHandler class): - the application logs a lot of messages, so I've implemented non-blocking logging (via...