Difference in these codes for lua logging http-log/splunk logging? #13277
Unanswered
jeremyjpj0916
asked this question in
Help
Replies: 1 comment 3 replies
-
Hello @jeremyjpj0916, it is a little difficult to follow your writeup, but If I understand correctly, you want to use the |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Originally tried to make my splunk log plugin and http-log plugin use some optimized code yall added and tweak it to work with the splunk:
Base path which requires a more splunk formatted payload than pure json see below example.
This requires the batched tx payload to look like this format which isn't true json:
True JSON(how kong does the json batch logging by default):
So why does this work for the format I need for the splunk logging:
But not this refactored version of your own new function yall use:
Any lua gurus see the main diff between the working one for me that gets the splunk format I need vs trying to make yalls new function work by stripping the []'s and ,'s ? Yall definitely moved away from the table concat one due to perf improvements in the memory of it all so I would love to move to it as well if I found what was going wrong with the way I tweaked it thats incorrect. Would even be nice if a splunk flag could be added to http-log plugin OSS to swap between native json and splunk's whacky body requirement too without me having to patch drop in the file manually.
Beta Was this translation helpful? Give feedback.
All reactions