we do something similar.  My suggestion, <div><br></div><div> md5(logentry + currentTimeInMilliseconds) as your key as you loop through the logfile</div><div><br></div><div><br><br><div class="gmail_quote">On Wed, Nov 2, 2011 at 3:03 PM, Mit Rowe <span dir="ltr"><<a href="mailto:mit@stagename.com">mit@stagename.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)">Hello!</div><div style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)">
<br></div>
<div style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)">For many reasons (QA, performance analytics, etc) we log all of our proxy traffic into a database.</div><div style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)">

<br></div><div style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)">We do this with varnish by collecting a text log via varnishncsa -F and a CSV formatted string, and regularly run a batch process that inserts this CSV data into a database.</div>

<div style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)"><br></div><div style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)">I was wondering... does varnish internally generate a reliably random unique value for each request (similar to mod_unique_id in apache or a uuid/guid), and if so is there a way that i can write it out to my logs, perhaps via an insertion into a request header and using the %{HEADER}i macro in varnishncsa? </div>

<div style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)"><br></div><font color="#888888"><div style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)">
-Mit</div>
<div><br></div><br>
</font><br>_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br></blockquote></div><br></div>