A Python logging handler library for Kafka consumers.
Project description
The following library simplifies the process of forwarding logs to a Kafka consumer.
How to Use
import logging
from kafka_logger.handlers import KafkaLoggingHandler
KAFKA_BOOTSTRAP_SERVER = ('<hostname:port>')
KAFKA_CA = '<path_to_ca_cert>'
TOPIC = '<publish_topic>'
logger = logging.getLogger('MyCoolProject')
# Instantiate your kafka logging handler object
kafka_handler_obj = KafkaLoggingHandler(KAFKA_BOOTSTRAP_SERVER,
TOPIC,
ssl_cafile=KAFKA_CA)
logger.addHandler(kafka_handler_obj)
# Set logging level
logger.setLevel(logging.DEBUG)
logger.info('Happy Logging!')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Close
Hashes for kafka-logging-handler-0.2.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2bd3e2b1a9720e08e0cdfe2fa8a6a7b527caffb2219d31c3d8f79573681c02b |
|
MD5 | 3f81feb6a585c787bf17b4797f71c7db |
|
BLAKE2b-256 | 2b9981e2b3563fd7b3d60d105c9ca7e1c0cbd3fab7f3475a26177394440f29d3 |
Close
Hashes for kafka_logging_handler-0.2.3-py3.6.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 516b95edb8cceb26d8962e699c0dfdb8547cd7ceeb4d0bdcc2175fef1bd07f5a |
|
MD5 | 19538e4d37ab6eff6fd2e95335dbab91 |
|
BLAKE2b-256 | d33a20c740b49c6f3193f850d8f13f04aa58e5ecc4132a5f2fb7186c503ba6bb |
Close
Hashes for kafka_logging_handler-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b90d0eb785aabe9bb6a566e36cda2321b696e3c35a67200cc9a84684871d0305 |
|
MD5 | d8e1b5ba9a94068fa487c80d1d7667cd |
|
BLAKE2b-256 | aff37e97f2a3c59842071a61aa0deb7255bec5b32b5201a89aee83b88dc57b35 |
Close
Hashes for kafka_logging_handler-0.2.3-py2.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | e866475ba9a0729830783745816d955af1688e7e4982bbf2be1a19138cf74dd7 |
|
MD5 | 5657afc975933c72c6571a40fac446ac |
|
BLAKE2b-256 | 67fdcb1fa399d18bd72f1ae1a16a15b375083db80951e92556b88e9ff4368d12 |
Close
Hashes for kafka_logging_handler-0.2.3-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | acf78bfdd2968ea3f43d23ac2f0f65194aecc3d6e409a8b3f902e40b7228780c |
|
MD5 | 495a004c02a98e930c021faa71e6cd66 |
|
BLAKE2b-256 | 30c2323911b96091918f18c01876a5b3f118ed027e9be4a2a1565368d17800bd |