Print incoming request in the logs with Headers and Body

Hi Team,

Can we print complete incoming request including all header parameters and body in the TYK logs. I am using TYK Open source edition.

I have enabled debug log but its not giving headers and body parameters. Please suggest.

Yes you can print or log incoming request in the logs. One easy way to achieve this is through a Virtual Endpoint. You can print the header or body using the JavaScript log function and it would appear in the gateway logs.

Alternatively, you can use the log function of any language in a custom plugin to achieve the same goal.

You could also use analytics with a pump to log your data to a file or any persistent data store.