Show TOC

Logging OperationsLocate this document in the navigation structure

Log various application events, by specifying a log level, then upload the client log to SAP Mobile Platform Server for analysis.


Define client log and trace policies in the SAP Mobile Platform Server Management Cockpit or HANA Cloud Platform Mobile Services Cockpit. For detailed information see SAP Mobile Platform or SAP HANA Cloud Platform Mobile Platform See Managing Application Logs and Traces.


See Supportability for Android for detailed information about logging and tracing.


  1. Initialize the logger, define a log level setting, and log messages:
    // Initializing logManager and sets the log level
    ClientLogger logger = Supportability.getInstance().getClientLogger(context, OnlineODataStore.class.getCanonicalName());
    logger.logDebug("log message");
  2. Retrieve logs:
    List<ClientLogEntry> entries = logMan.getLogEntries();
  3. Upload the client log to SAP Mobile Platform Server:
    SupportabilityUploaderImpl uploader = new SupportabilityUploaderImpl(conv, context);
    logMan.uploadClientLogs(uploader, new UploadListener() {
    public void onUploadSuccess() {
       	makeToastText("Log Upload Successful");
       public void onUploadFailure(UploadResult result) {
       	String msg = "Log Upload Failed: " + result.getResponseStatusCode() + ", " + result.getHint();