dylanmei / logspout-kafka

Logspout adapter for writing Docker container logs to Kafka topics
MIT License
52 stars 41 forks source link

Logspout sometimes stops writing logs #7

Open MaxFlanders opened 8 years ago

MaxFlanders commented 8 years ago

I do not know how to pinpoint if this is a logspout issue or a logspout-kafka issue, but we have logspout set up writing logs to kafka and it periodically stops writing logs to kafka sometimes. It is very irregular, sometimes a service will log for hours without issue and stop inexplicably. Have you guys ever seen any cases like this?? Sometimes I think it has to do with docker containers starting and stopping very quickly but then other times we wont touch it for an extended period before it stops.

Struggling a lot with this, any help appreciated, thanks!

MaxFlanders commented 8 years ago

In kafka.go, I see this line:

if os.Getenv("DEBUG") != "" {
    log.Printf("Starting Kafka producer for address: %s, topic: %s.\n", brokers, topic)
}

Do you know how I can enable this debug option?? I tried setting an environment variable on my machine and restarting logspout, but it did not take, I never saw any logs of the form mentioned there.

dylanmei commented 8 years ago

Hello! I have never seen your issue that logging "stops inexplicably" so we can surely use more information. :)

Running docker run --rm -e "DEBUG=1" logspout-image isn't working for you?

MaxFlanders commented 8 years ago

Ah I wasn't sure the syntax to enable it, I will try that! Thanks! It's been hard to get data, logspout is so lightweight, and the "stops" have been irregular. But thank you for the info!