# Log more information, package destination

**URL:** <https://discourse.haproxy.org/t/log-more-information-package-destination/1615>\
**Category:** Help!\
**Created:** [September 28, 2017, 8:31am UTC](https://discourse.haproxy.org/t/log-more-information-package-destination/1615 "2017-09-28T08:31:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dalu](https://avatars.discourse-cdn.com/v4/letter/d/7bcc69/32.png) [@dalu](https://discourse.haproxy.org/u/dalu)\
**Post date:** [September 28, 2017, 8:31am UTC](https://discourse.haproxy.org/t/log-more-information-package-destination/1615/1 "2017-09-28T08:31:08Z")

</div>

Hey guys,  
I’m working on a project for my Bachelor thesis and I am currently trying to understand how HAProxy works. For my project I’d like to log more information from HAProxy. My defaults are

> mode http  
> timeout client 120s  
> timeout server 120s  
> timeout connect 30s  
> option http-buffer-request  
> option httplog  
> option tcplog  
> option log-health-checks  
> log global

I would like to log where every single http-Package is sent to according to my ACL. My ACL, according to my .cnf SHOULD send a package according to information in the http-body.

> acl **name** req.body -m reg \< WhatImLookingFor \>  
> use\_backend bert if **name**

Am I on the right track? Or do I need to change something in the source code?

Sorry, I’m a newbie to communication protocols and C.

Thanks in advance,  
DL

---

<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:** [September 28, 2017, 11:59am UTC](https://discourse.haproxy.org/t/log-more-information-package-destination/1615/2 "2017-09-28T11:59:36Z")

</div>

> [@dalu](#):
>
> option httplog  
> option tcplog

Use one of those 2. Remove tcplog, if you already using httplog.

> [@dalu](#):
>
> I would like to log where every single http-Package is sent to according to my ACL. My ACL, according to my .cnf SHOULD send a package according to information in the http-body.

I assume “package” means transaction or request. You can already see that with regular logging.

Read the logging section in the manual, more specifically the section regarding httplog:  
[http://cbonte.github.io/haproxy-dconv/1.7/configuration.html#8](http://cbonte.github.io/haproxy-dconv/1.7/configuration.html#8)  
[http://cbonte.github.io/haproxy-dconv/1.7/configuration.html#8.2.3](http://cbonte.github.io/haproxy-dconv/1.7/configuration.html#8.2.3)

---

<div class="post-metadata">

**Author:** ![dalu](https://avatars.discourse-cdn.com/v4/letter/d/7bcc69/32.png) [@dalu](https://discourse.haproxy.org/u/dalu)\
**Post date:** [September 29, 2017, 7:29am UTC](https://discourse.haproxy.org/t/log-more-information-package-destination/1615/3 "2017-09-29T07:29:19Z")

</div>

Hey, thank your for your input.

> [@lukastribus](#):
>
> option httplog
> 
> option tcplog
> 
> Use one of those 2. Remove tcplog, if you already using httplog.

But why? Do they not stack? Or does tcp log override my httplog setting?

DL

---

<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:** [September 29, 2017, 7:43am UTC](https://discourse.haproxy.org/t/log-more-information-package-destination/1615/4 "2017-09-29T07:43:13Z")

</div>

No, they don’t stack, the are different logging formats, you either use one or the other.

I don’t know for certain, but I guess tcplog would overwrite httplog in this case, so you would lack all the details httplog provides.

---

<div class="post-metadata">

**Author:** ![Sandeep.rai2k17](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@Sandeep.rai2k17](https://discourse.haproxy.org/u/Sandeep.rai2k17)\
**Post date:** [October 17, 2017, 10:50am UTC](https://discourse.haproxy.org/t/log-more-information-package-destination/1615/5 "2017-10-17T10:50:35Z")

</div>

Hey Dalu!!!  
I think what you are doing is for project thesis!!!  
This is the way what you have mentioned in configuration file is syslog. that log would not be sufficient for you mate…  
if you really interested for so, you may enable the debug log in Makefile. and run with ./haproxy -f /etc/haproxy/haproxy.cfg -d. Alternatively, is the trace log. That are useful in your case to understand. Another option is to use sysdig. you need to install sysdig on Linux machine. and before starting haproxy open a tab and use the command : # sysdig proc.name=haproxy; that would generate the log for haproxy. which shows the http socket connection between backend server and haproxy server [for health check, frontend, backend starting, curl related while load balancing is being performed].

Let me know if you face any issue while doing above.
