tracer0tong / kafkalogrus

Modified version of Kafka hook for Logrus
Apache License 2.0
7 stars 10 forks source link

Unable to close sarama.AsyncProducer #2

Closed linfn closed 6 years ago

linfn commented 6 years ago

The sarama.AsyncProducer needs to Close

tracer0tong commented 6 years ago

@llife09 if this is bug report, it's quite short. Logrus hook interface doesn't have special "Close" method. And in theory only one hook should be created per one hook assignment. So, in general, only one or several required amount of objects will be created, it will save from resource leakage. But graceful producer termination seems difficult for realization here.