kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Melville <amelvi...@g.hmc.edu>
Subject Location of Logging Files/How To Turn On Logging For Kafka Components
Date Wed, 05 Nov 2014 07:25:51 GMT

I have searched for a while online, and through the files located in the
kafka/logs directory, trying to find where kafka writes log output to in
order to debug the SimpleProducer I wrote. My producer is almost identical
to the simple producer located here


except for I'm using Protobuffers instead of Strings to publish data to a
cluster. I'm receiving the following error when I try to run the

Exception in thread "main" kafka.common.FailedToSendMessageException:
Failed to send messages after 3 tries.


at kafka.producer.Producer.send(Producer.scala:76)

at kafka.javaapi.producer.Producer.send(Producer.scala:33)

at stream.SimpleProducer.send(Unknown Source)

at stream.SimpleProducer.main(Unknown Source)

I know this isn't a network problem, because I ran the console-producer and
successfully published data to the same broker that my Simple Producer is
trying to publish to. I now want to try to debug this error.


Where would my Simple Producer write info about its startup and eventual
error, such that I can read it and try to reason as to why it failed? If it
produces no log data on its own, what is the best way to write this data to
a somewhere where I can use it to debug? I've noticed that log4j, which I
understand is a often-used library for logging in Java, came with my kafka
download. Am I supposed to use log4j for this info? I do not know very much
about log4j, so any info on how to get this setup would also be appreciated.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message