-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: 'KafkaLoggingHandler' object has no attribute 'producer' #15
Comments
Hi, This repo is not maintained anymore. You can check my fork of this repo for an updated version of the library and try your script against it. Thanks, |
thank you for your reply |
You can submit a PR with the necessary fix to use the I might be able to do that in the following days. |
Although I just looked at the new version and it should work. Can you show me the relevant code to see what's wrong? |
./check_kafka.py the name of the module is python-kafka-logger and not python-kafka-logging /usr/bin/pip2.7 list I modified the section handler_kafkaHandler in logging.conf [Handler_kafkaHandler] but I have the same error message an idea ? |
OK, I just released a new version (0.4) of my library with the versions updated and the example file fixed. The class you should use is:
It worked on my Python console:
|
Hello, ./check_kafka.py thanks for you help |
Can you please share your script with me? Or at least the part where you initiate the |
config file [loggers] [handlers] [formatters] [logger_root] [handler_fileHandler] [handler_kafkaHandler] [handler_consoleHandler] [formatter_simpleFormatter] [formatter_logstashFormatter] the script can be found here |
little extra information the kafka is configured in ssl mode |
OK after a closer look at the exception I found the problem:
This means Kafka can't be reached via these hosts, which makes sense because you're using the port which usually reserved for the What you probably need to do is to change the port to the one Kafka is using, which by default is |
Hello
I use the check_kafka script and I have the following error message, and I do not see where the problem is, below the logging.conf file
[loggers]
keys=root
[handlers]
keys=consoleHandler,fileHandler,kafkaHandler
[formatters]
keys=simpleFormatter,logstashFormatter
[logger_root]
level=DEBUG
handlers=consoleHandler,fileHandler,kafkaHandler
formatter=simpleFormatter
[handler_fileHandler]
class=logging.handlers.WatchedFileHandler
level=DEBUG
formatter=simpleFormatter
args=('/var/log/check_kafka.log', 'a')
[handler_kafkaHandler]
class=python_kafka_logging.KafkaHandler.KafkaLoggingHandler
level=DEBUG
formatter=logstashFormatter
args=("192.168.0.35:2181, 192.168.0.193:2181","apps-openshift")
[handler_consoleHandler]
class=StreamHandler
level=DEBUG
formatter=simpleFormatter
args=(sys.stdout,)
[formatter_simpleFormatter]
format=%(asctime)s - %(levelname)s - %(name)s - %(message)s
[formatter_logstashFormatter]
class=logstash_formatter.LogstashFormatter
format={"extra": {"appName": "myPythonApp", "environment": "AWS-Test"}}
can you help me ?
thanks
The text was updated successfully, but these errors were encountered: