OData Debugging¶
To troubleshoot OData communication between the app and the server, enable trace logging. Trace logging shows the complete network traffic details.
Warning
Be aware that trace logging may also print confidential data and may not be appropriate on productive systems.
Logger logger =
(ch.qos.logback.classic.Logger) LoggerFactory.getLogger("com.sap.cloud.mobile.odata");
logger.setLevel(Level.TRACE);
provider.setTraceRequests(true);
provider.setPrettyTracing(true);
provider.setTraceWithData(true);
Bug
If using the OKHttp Logging Interceptor
to trace requests instead, the HttpLoggingInterceptor.Level.BODY
will break streaming requests. See the reported issue here.
Last update: November 18, 2021