Hi,
Need a suggestion with better approach instead of using KVM and also create new line in the splunk for all the requests .
For logging mechanism , I used message logging policy and I created a variable in the message tag, that variable pulling the data from the KVM.
The reason I used KVM,
1- Development team can add/update the variables in the log
2- Create a new line in the splunk for all the requests
Logging policy:
<Message>{logTemplate}</Message>
requestLogTemplate in KVM: {"apiproxyName":"{apiproxy.name}";"clientReceivedStartTime":"{client.received.start.time}";"clientEndTime":"{system.time}";"queryParam":"{request.querystring}"}
Created a JS policy to retrieve requestLogTemplate from KVM and create new line.
logTemplate = logTemplate+ '\n';