We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fblog -f 'method=="POST" and header.X-Customer-Id[1]=="123456"' -a body -a res_body req.log
{ "header":{ "X-Tenant-Id": ["123456"] } }
The text was updated successfully, but these errors were encountered:
You can use --print-lua to see what variables fblog creates. In your example it looks like this:
--print-lua
header = {X_Tenant_Id = {"123456","343434"}}
So with your example this seems to work:
» cat sample_array_dashes.json {"header":{"X-Tenant-Id": ["123456", "343434"]}} » fblog --print-lua -f 'header.X_Tenant_Id[1] == "123456"' -d sample_array_dashes.json header = {X_Tenant_Id = {"123456","343434"}} UNKNO: header > X-Tenant-Id[1]: "123456" header > X-Tenant-Id[2]: "343434"
I haven't encountered arrays in log files yet so there is probably room for improvement. Let me know.
Sorry, something went wrong.
I added --print-lua to the readme
@bomgar thanks, i will try it.
No branches or pull requests
fblog -f 'method=="POST" and header.X-Customer-Id[1]=="123456"' -a body -a res_body req.log
The text was updated successfully, but these errors were encountered: