Logging variable in request



  • Andrew Betts

    Hi @alex,

    Two ways you can do this:

    1. Set req.http.SOMETHING in recv, unset the header in miss and pass, once it has been transferred onto bereq, ie. unset bereq.http.SOMETHING, which will preserve the req.http version for later inspection in vcl_log.
    2. Emit your log event directly from recv, using an explicit log statement. You can emit log data from any VCL function, not just vcl_log.
    Comment actions Permalink
  • alex Na

    Thanks a lot, @triblondon!

    Went for option 1 since I guess logging in vcl_recv and vcl_recv for the same request would produce 2 logs entries.

    Comment actions Permalink

Please sign in to leave a comment.