Request to server : curl -v localhost --header "host:
sandbox.bids.stg.bidstalk.com" --data '{"at":2,"device":{"connectiontype":0,"devicetype":1,"geo":{"country":"JPN","region":"Gunma","lat":34.3853,"lon":132.4553,"type":3,"zip":"00051"},"ip":"58.183.128.0","carrier":"SoftBank JP","didsha1":"23456789922","js":1,"make":"Apple","model":"iPhone5","os":"iOS","ua":"Mozilla/5.0 (iPhone; CPU iPhone OS 6_1_1 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10B145 Safari/8536.25"},"ext":{"udi":{}},"id":"r9r2HHDrAs","imp":[{"banner":{"btype":[1,2,3,4],"h":50,"mimes":["image/png","image/jpg","image/gif"],"pos":0,"w":320},"displaymanager":"SOMA","displaymanagerver":"somaapi-400","id":"1"},{"banner":{"btype":[1,2,3,4],"h":50,"mimes":["image/png","image/jpg","image/gif"],"pos":0,"w":320},"displaymanager":"SOMA","displaymanagerver":"somaapi-400","id":"2"}],"site":{"cat":["IAB1"],"domain":"
www.matomy997.com","id":"65758263","name":"NetworkPub_F_997(kk)","publisher":{"id":"923838746"}},"user":{}}'
-Add the access_log to your config as mentioned above.
-During curl the content_by_lua file code will be executed, try setting values the variables declared in ngx.var[NGX_FILE_VAR1] or ngx.var[NGX_FILE_VAR2] for the request and see that there are blank lines coming in one of the access_log files.
-What I am seeing on my end is that for the condition when I am not logging anything to one of the files, blank lines are being printed into that file, while the other access_log file gets the parameters I want to log. Also the same blank line behavior is happening in both access_log files if I disable the code in lua which sets the variables (I was expecting that in this case nothing should come to access_logs).
Some of these request responses are to be logged into one access_log file and for other types of headers in the request some response values are to be logged into another access_log file, but blank lines are coming constantly per request in one of the access_log files as mentioned in the previous post.
Please let me know in case any more information is required.