Skip to main content

eslogging

This is a fork of CMRESHandler.py project. We didn't contribute to it as there's no maintenance of that project anymore.

Python Elasticsearch Log handler


This library provides an Elasticsearch logging appender compatible with the

python standard logging <https://docs.python.org/2/library/logging.html>_ library.

The code source is in github at `https://github.com/cmanaha/python-elasticsearch-logger

https://github.com/cmanaha/python-elasticsearch-logger`_

Installation

============

Install using pip::

pip install eslogging

Requirements Python 3

=====================

This library requires the following dependencies

  • elasticsearch

  • requests

Additional requirements for Kerberos support

============================================

Additionally, the package support optionally kerberos authentication by adding the following dependecy

  • requests-kerberos

Additional requirements for AWS IAM user authentication (request signing)

=========================================================================

Additionally, the package support optionally AWS IAM user authentication by adding the following dependecy

  • requests-aws4auth

Building the sources & Testing


To create the package follow the standard python setup.py to compile.

To test, just execute the python tests within the test folder

Why using an appender rather than logstash or beats


In some cases is quite useful to provide all the information available within the LogRecords as it contains

things such as exception information, the method, file, log line where the log was generated.

If you are interested on understanding more about the differences between the agent vs handler

approach, I'd suggest reading this conversation thread <https://github.com/cmanaha/python-elasticsearch-logger/issues/44/>_

The same functionality can be implemented in many other different ways. For example, consider the integration

using SysLogHandler <https://docs.python.org/3/library/logging.handlers.html#sysloghandler>_ and

logstash syslog plugin <https://www.elastic.co/guide/en/logstash/current/plugins-inputs-syslog.html>_.

Contributing back


Feel free to use this as is or even better, feel free to fork and send your pull requests over.

build Status

downloads

license

Metadata

Release files for eslogging 1.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for eslogging 1.0.8
File Interpreter ABI Platform
eslogging-1.0.8-py3-none-any.whl Python 3 none any Details

Release files / eslogging-1.0.8-py3-none-any.whl

Download URL eslogging-1.0.8-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9857782f4e2ab0fda347c4d4361b6a185b4ac9179fd0bf2658a008a64b1d830f
BLAKE2b-256 checksum
How to use checksums
224088698da130ce079a7a70c42d8621872e3a8c0ce8a6cbe476f6761d94526c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.13

Security for eslogging 1.0.8

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page