Re: Looking for help about "req.body" logging

2015-10-22 Thread Willy Tarreau
On Thu, Oct 22, 2015 at 12:12:41PM +0200, Baptiste wrote: > To share this information to everyone, here is what Alberot might have done: > > global > log 127.0.0.1:514 local0 info > > defaults > log global > log-format "body: %[capture.req.hdr(0)]" > mode http > > frontend f > declare captu

Re: Looking for help about "req.body" logging

2015-10-22 Thread Alberto Zaccagni
Yes :D I am writing a blog post on that: https://github.com/lazywithclass/lazywithclass.github.io/blob/master/2015-10-22/README.md#logging-request-body-in-haproxy Also because I am using the default log-format, so before adding the request body I will have to get the configuration string that defin

Re: Looking for help about "req.body" logging

2015-10-22 Thread Baptiste
To share this information to everyone, here is what Alberot might have done: global log 127.0.0.1:514 local0 info defaults log global log-format "body: %[capture.req.hdr(0)]" mode http frontend f declare capture request len 8192 # id=0 to store request body bind 127.0.0.1:8001 http-reques

Re: Looking for help about "req.body" logging

2015-10-22 Thread Alberto Zaccagni
Sorry for skipping over that part, I thought I've understood what the example in http://blog.haproxy.com/2015/10/14/whats-new-in-haproxy-1-6/ meant, but I did not. I now get it and it worked, thanks Baptiste. Alberto On Thu, 22 Oct 2015 at 08:53 Baptiste wrote: > You might have missed the most

Re: Looking for help about "req.body" logging

2015-10-22 Thread Baptiste
You might have missed the most important part of my previous mail, so I'm repeating it again: "Look for capture in this page http://blog.haproxy.com/2015/10/14/whats-new-in-haproxy-1-6/ and use it to capture the body at the request time and log it." Use req.body in the example and log the capture.

Re: Looking for help about "req.body" logging

2015-10-22 Thread Alberto Zaccagni
Hello Baptiste, I've read both the 1.6 announcement and the docs about this feature, but u could not get it to work, I know I'm doing something wrong, I just don't know what. I've posted my configuration in the previous email, here is it: https://gist.github.com/lazywithclass/d255bb4d2086b07be178

Re: Looking for help about "req.body" logging

2015-10-21 Thread Baptiste
Hi, I guess this is because the sample applies to a request element while logging happens after the response has been sent, so data is not available anymore. Look for capture in this page http://blog.haproxy.com/2015/10/14/whats-new-in-haproxy-1-6/ and use it to capture the body at the request tim

Re: Looking for help about "req.body" logging

2015-10-21 Thread Alberto Zaccagni
Did anyone succeeded in logging req.body? If so I would likely appreciate an example / some hints / a pointer into the docs, even though I've looked into this last one and could not find how to do it. Thank you Alberto On Fri, 16 Oct 2015 at 10:40 Alberto Zaccagni < alberto.zacca...@lazywithclas

Re: Looking for help about "req.body" logging

2015-10-16 Thread Alberto Zaccagni
Yes, I did turn it on. Or so I think, please have a look at my configuration file: https://gist.github.com/lazywithclass/d255bb4d2086b07be178 Thank you Alberto On Fri, 16 Oct 2015 at 10:12 Baptiste wrote: > > Le 16 oct. 2015 10:46, "Alberto Zaccagni" < > alberto.zacca...@lazywithclass.com> a é

Re: Looking for help about "req.body" logging

2015-10-16 Thread Baptiste
Le 16 oct. 2015 10:46, "Alberto Zaccagni" < alberto.zacca...@lazywithclass.com> a écrit : > > Hello, > > Sorry for the repost, but it's really not clear to me how to use this feature: "Processing of HTTP request body" in http://blog.haproxy.com/2015/10/14/whats-new-in-haproxy-1-6/, can it be used t

Looking for help about "req.body" logging

2015-10-16 Thread Alberto Zaccagni
Hello, Sorry for the repost, but it's really not clear to me how to use this feature: "Processing of HTTP request body" in http://blog.haproxy.com/2015/10/14/whats-new-in-haproxy-1-6/, can it be used to log the body of a request? I am trying to use it like this in both my HTTP and HTTPS frontends