Hi all,<br>I have two issues with cookie logging:<br><br>1) I want to know which is the best way to say this in nginx:<br><br>If the user is new user log $uid_set else log $uid_got instead.<br><br>I was previously having apache on my servers..and this was happening by default. But I don&#39;t know what to do now..in nginx. Basically i want the cookie to be logged whether he is<br>
a new user or not. But I dont want to log both $uid_set an $uid_got on my logs...<br><br>I can only think of one way to achieve this...an if block that checks $uid_got to have any value...if it has,&nbsp; have a log format (say A)<br>
another if block again checking the same thing and it has no value then have a different log format(say B).<br><br>Is there a better way?<br><br>2) I understand that the nginx sends the base64 encoded value of the cookie to the browser..but logs($uid_set/$uid_got) the actual value as a hex string....<br>
For Eg:<br>like on the browser we have:<br><br>KQGowEkCmLwATSmbAwMDAg==<br><br>But on the logs when we log $uid_got we get :<br><br>C0A80129BC9802499B294D0002030303.<br><br>I know both are same.<br><br>But the issue is I have one another apache server (a subdomain) which just logs.. cookies (HTTP_COOKIE) (but no setting)&nbsp; ..hence effectively this one logs the value got from the browser (the base64 encoded value)..<br>
Because of this I&#39;m not able to do any correlational studies between logs of nginx(which set the cookies) and the apache logs....Is there a way around? other than me writing a wrapper to do an <br>in place edit of the logs?<br>
<br>Regards<br>Harish<br><br>