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
Add some samples on how to log for example the Headers or Params of the Request.
One example to log the Request Headers in multiple ways :
{ "requestId": "${request.id}", "transactionId": "${request.transactionId}", "requestHeaders": [ "${request.headers['User-Agent'][0]}" ], "requestHeadersList": { <#list request.headers as header, value> "${header}": "${value?join(", ")}"<#sep>, </#list> }, "requestHeadersList2": { <#list request.headers as header, values> "${header}": [ <#list values as value> "${value}"<#sep>, </#list> ]<#sep>, </#list> }, "requestMethod": "${request.method}", "uri": "${request.uri}", "path": "${request.path}", "planUsed": "${request.metrics.plan}" }
this will result in the following output :
{ "requestId": "589be0b2-4350-4d08-9be0-b243507d08a1", "transactionId": "589be0b2-4350-4d08-9be0-b243507d08a1", "requestHeaders": [ "PostmanRuntime/7.28.4" ], "requestHeadersList": { "X-Forwarded-For": "12.34.56.78", "X-Forwarded-Proto": "https", "X-Forwarded-Port": "443", "Host": "api-dev.graviteeio.com", "X-Amzn-Trace-Id": "Root=1-615eead9-6d6e2ae5047bbca1301d6c59", "test": "test,123,456, sdfsdf", "User-Agent": "PostmanRuntime/7.28.4", "Accept": "*/*", "Postman-Token": "295d04d0-1a6e-4ef9-838d-271b5213ecb1", "Accept-Encoding": "gzip, deflate, br", "X-Gravitee-Transaction-Id": "589be0b2-4350-4d08-9be0-b243507d08a1", "X-Gravitee-Request-Id": "589be0b2-4350-4d08-9be0-b243507d08a1" }, "requestHeadersList2": { "X-Forwarded-For": [ "12.34.56.78" ], "X-Forwarded-Proto": [ "https" ], "X-Forwarded-Port": [ "443" ], "Host": [ "api-dev.graviteeio.com" ], "X-Amzn-Trace-Id": [ "Root=1-615eead9-6d6e2ae5047bbca1301d6c59" ], "test": [ "test,123,456", "sdfsdf" ], "User-Agent": [ "PostmanRuntime/7.28.4" ], "Accept": [ "*/*" ], "Postman-Token": [ "295d04d0-1a6e-4ef9-838d-271b5213ecb1" ], "Accept-Encoding": [ "gzip, deflate, br" ], "X-Gravitee-Transaction-Id": [ "589be0b2-4350-4d08-9be0-b243507d08a1" ], "X-Gravitee-Request-Id": [ "589be0b2-4350-4d08-9be0-b243507d08a1" ] }, "requestMethod": "GET", "uri": "/at/echo", "path": "/at/echo", "planUsed": "78033416-dce4-493a-8334-16dce4c93ada" }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Add some samples on how to log for example the Headers or Params of the Request.
One example to log the Request Headers in multiple ways :
this will result in the following output :
The text was updated successfully, but these errors were encountered: