Printing Log Messages

The following code example retrieves log messages resulting from login failures where the Unwired Server writes the failure record into the LogRecordImpl table. You can implement the onLoginFailure callback to print out the server message.

SUPQuery * query = [SUPQuery getInstance];   
SampleAppLogRecordImplList* loglist = (SUP101LogRecordImplList*)[SUP101SUP101DB getLogRecords:query];
  for(SUP101LogRecordImpl* log in loglist)
  {
    MBOLogError(@"Log Record %llu: Operation = %@, Component = %@, message = %@", log.messageId, log.operation, log.component,log.message);
  }