HAPROXY Logging system

I use HAPROXY for tcp-loadbalancing. Business requires writing to log-file of start and end session separately. I know option logasap allows to write in log immediately when session was begun. This option cannot be used because when session is terminated haproxy don’t write in log nothing.
How to solve such case? Need help.