You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Milind Vaidya <ka...@gmail.com> on 2017/04/12 21:23:59 UTC

[users@httpd] Issues with Piped Logs

Hi

I have successfully implemented piped logs scenario.


The setting in httpd.conf looks as follows :

ErrorLog "| /usr/bin/tee -a /var/log/httpd/error_log |  /usr/bin/java -cp
/usr/local/bin/CustomProducer/producer.jar stdin.producer.StdInProducer
/usr/local/bin/CustomProducer/config.json >> /var/log/producer_init.log
2>&1"


Apache successfully starts the process and logs are sent to the producer as
will which consumes it from stdin. This is a Apache Kafka command line
producer. It buffers the logs before sending out size of which is
controllable using setting.

I am consuming these logs using another consumer.

Problem :

Across restart it was found that some logs are missing between error_log
file and what consumer is receiving. Can somebody throw a light on how this
mechanism works ? In the sense is it that the dependent process ends first
and then apache stops in which case it writes few logs that are not passed
on.


Or is is that after restart, the dependent process takes some  time to
start after apache in which case as well few initial logs are missed ?


And finally is there way to overcome this loss ?