## Kafka Logger for Python
### Why this exists?
There’s an existing python package that can send log to logstash through Kafka, but it has two problems:
1. It’s built on top of a specific python kafka package and it’s outdated, which left user no choice on which Kafka they can use. 2. It only uses default log formatting from python logging package, which doesn’t provide much useful information.
### Install
pip install kafka-logger
### Usage
import logging import KafkaLoggingHandler logger = logging.getLogger(‘python-logstash-logger’) logger.setLevel(logging.INFO) log_producer = KafkaProducer(bootstrap_servers=KAFKA_BROKER) logger.addHandler(KafkaLoggingHandler(log_producer, ‘app-log’))
Metadata
Release files for kafka-logger 0.3.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 | Actions |
|---|---|---|---|---|
| kafka-logger-0.3.0.tar.gz | 2.9 kB | Without provenance | Details for kafka-logger-0.3.0.tar.gz |
Release files / kafka-logger-0.3.0.tar.gz
| Download URL | kafka-logger-0.3.0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae41351a926bc3aaf2b862402722308631036748ca07cadf1b3256763601d832
|
|
BLAKE2b-256 checksum How to use checksums |
975ba3a7daf5f5eeac6b1a984654b96339f024dafa4b3a6620339cb6ccd11e09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for kafka-logger 0.3.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.