# Logging both TCP connect and disconnect

**URL:** <https://discourse.haproxy.org/t/logging-both-tcp-connect-and-disconnect/3164>\
**Category:** Help!\
**Created:** [November 1, 2018, 7:08pm UTC](https://discourse.haproxy.org/t/logging-both-tcp-connect-and-disconnect/3164 "2018-11-01T19:08:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kelner](https://avatars.discourse-cdn.com/v4/letter/k/919ad9/32.png) [@kelner](https://discourse.haproxy.org/u/kelner)\
**Post date:** [November 1, 2018, 7:08pm UTC](https://discourse.haproxy.org/t/logging-both-tcp-connect-and-disconnect/3164/1 "2018-11-01T19:08:24Z")

</div>

Good day!  
Unfortunately I could not find the method which allows to record in the log both frontend connection and frontend disconnection events. In case, when TCP session is short it is not a problem, but when the TCP session is long IMHO start record and stop record are needed.

Playing with logs.logwait in /src/diff stream.c I reached desirable effect, but I am not specialist and don’t like hacks 🙂 IMHO it would be better if we have in config something like two independent options: options logstart and option logstop instead of option logasap

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [November 1, 2018, 10:20pm UTC](https://discourse.haproxy.org/t/logging-both-tcp-connect-and-disconnect/3164/2 "2018-11-01T22:20:17Z")

</div>

Hello,

all the development related discussion happens on the mailing list, I suggest you send this there (no need to subscribe):

`haproxy@formilux.org`
