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

Thanks for your help

Alberto

On Wed, 21 Oct 2015, 9:58 p.m. Baptiste <[email protected]> wrote:

> 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 time and log it.
>
> If it still doesn't work, post your configuration.
>
> Baptiste
>
>
> On Wed, Oct 21, 2015 at 5:31 PM, Alberto Zaccagni
> <[email protected]> wrote:
> > 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
> > <[email protected]> wrote:
> >>
> >> 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 <[email protected]> wrote:
> >>>
> >>>
> >>> Le 16 oct. 2015 10:46, "Alberto Zaccagni"
> >>> <[email protected]> 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
> >>> > to log the body of a request?
> >>> >
> >>> > I am trying to use it like this in both my HTTP and HTTPS frontends:
> >>> >
> >>> > option http-buffer-request
> >>> > log-format "%[req.body]"
> >>> >
> >>> > The error I get is "'log-format' : sample fetch <req.body> may not be
> >>> > reliably used here because it needs 'HTTP request headers' which is
> not
> >>> > available here.", where should I be using it?
> >>> > Does that mean that we cannot log req.body at all or that I have to
> >>> > enable another option before trying to use it?
> >>> >
> >>> > Any hint or help is much appreciated.
> >>> > Thank you.
> >>> >
> >>> > Cheers
> >>>
> >>> Have you turned on 'mode http'?
> >>>
> >>> Baptiste
>

Reply via email to