I need to change the "Logging Level" to "Full" for some REST APIs in ODC, I didn't find it on the portal, how can I enable this log?
Hey @Murilo Antonio de Souza,
Have you ever checked the Traces at ODC portal it contains much info when API fails.Hope this helps.
Kind ragards
Aayush Shrivastava
HI Aayush.
Yes, I have already checked, this trace has several important information, but I need the request and response payload, which I could not find on the ODC portal.
Kind regards.Murilo Antonio
Has this been solved?
I had the same problem. I've added a breakpoint in the OnBeforeRequest/OnAfterRepsonse and saw the details of request/response respectively. Also, you can log these info using the LogMessage server action.
As of now, ODC does not provide a direct option to adjust the logging level for REST APIs. By default, ODC captures standard logs and traces for REST API operations.
Monitoring REST API Activity in ODC:
Access the Monitoring Section:
View Logs and Traces:
Alternative Approach for Enhanced Logging:
If you require more granular logging than what is currently available in ODC, consider implementing custom logging within your REST API logic:
I already use the logs in the ODC Portal, i just want these logs to be shown in my application. For people who do not have acces to the ODC Portal to be able to see them.
I don't find any api to get the logs from ODC portal. I think you need to create custom log to show or use some tool like grafana or datadog to capture the logs.
There is no direct way you can check error logs for rest api errors.
To check logs and trace follow the documentation
https://success.outsystems.com/documentation/outsystems_developer_cloud/monitoring_and_troubleshooting_apps/
https://success.outsystems.com/documentation/outsystems_developer_cloud/monitoring_and_troubleshooting_apps/traces/server_side_traces/
https://success.outsystems.com/documentation/outsystems_developer_cloud/integration_with_external_systems/consume_rest_apis/handling_rest_errors/
I already created an apilogging the only issue is that i am still missing some stuff.
I will add the OML. so you can see what i created.
ok Ill check and let you know. but can you please provide more detail about missing some stuff ?
I want to put the Request and response into one record but i can't create a id in an onrequest and give that to the onresponse.
you can use guid using GenerateGuid by this you can reference it in both events