Skip to content

Logging

Logging can be helpful when you run into any issues. They contain information on how you use our products that helps us analyze, troubleshoot, and debug any issues you may experience.

How Do I Collect Logs?

Collect Logs From Your Application

1. Enable parameters listed below in your code in addition to those you already use:

Warning

These parameters should be set before starting the recognition process, e.g. after the initialization process is passed.

  • If you are experiencing the issue with ID documents recognition or verification, choose the following settings:
DocReader.shared.processParams.debugSaveLogs = true
DocReader.shared.processParams.debugSaveCroppedImages = true
[RGLDocReader shared].processParams.debugSaveLogs = @YES;
[RGLDocReader shared].processParams.debugSaveCroppedImages = @YES;
DocumentReader.Instance().processParams().debugSaveLogs = true
DocumentReader.Instance().processParams().debugSaveCroppedImages = true
DocumentReader.Instance().processParams().debugSaveLogs = true;
DocumentReader.Instance().processParams().debugSaveCroppedImages = true;
DocumentReader.instance.processParams.debugSaveLogs = true;
DocumentReader.instance.processParams.debugSaveCroppedImages = true;
DocumentReader.setProcessParams({
    debugSaveLogs: true,
    debugSaveCroppedImages: true,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    debugSaveLogs: true,
    debugSaveCroppedImages: true
});
DocumentReader.setProcessParams({
    debugSaveLogs: true,
    debugSaveCroppedImages: true,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().DebugSaveLogs = (Java.Lang.Boolean)true;
DocumentReader.Instance().ProcessParams().DebugSaveCroppedImages = (Java.Lang.Boolean)true;

// iOS
RGLDocReader.Shared.ProcessParams.DebugSaveLogs = true;
RGLDocReader.Shared.ProcessParams.DebugSaveCroppedImages = true;
  • If you are experiencing the issue with RFID chip reading, choose the following settings:
DocReader.shared.processParams.debugSaveLogs = true
DocReader.shared.processParams.debugSaveCroppedImages = true
DocReader.shared.processParams.debugSaveRFIDSession = true
[RGLDocReader shared].processParams.debugSaveLogs = @YES;
[RGLDocReader shared].processParams.debugSaveCroppedImages = @YES;
[RGLDocReader shared].processParams.debugSaveRFIDSession = @YES;
DocumentReader.Instance().processParams().debugSaveLogs = true
DocumentReader.Instance().processParams().debugSaveCroppedImages = true
DocumentReader.Instance().processParams().debugSaveRFIDSession = true
DocumentReader.Instance().processParams().debugSaveLogs = true;
DocumentReader.Instance().processParams().debugSaveCroppedImages = true;
DocumentReader.Instance().processParams().debugSaveRFIDSession = true;
DocumentReader.instance.processParams.debugSaveLogs = true;
DocumentReader.instance.processParams.debugSaveCroppedImages = true;
DocumentReader.instance.processParams.debugSaveRFIDSession = true;
DocumentReader.setProcessParams({
    debugSaveLogs: true,
    debugSaveCroppedImages: true,
    debugSaveRFIDSession: true,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    debugSaveLogs: true,
    debugSaveCroppedImages: true,
    debugSaveRFIDSession: true
});
DocumentReader.setProcessParams({
    debugSaveLogs: true,
    debugSaveCroppedImages: true,
    debugSaveRFIDSession: true,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().DebugSaveLogs = (Java.Lang.Boolean)true;
DocumentReader.Instance().ProcessParams().DebugSaveCroppedImages = (Java.Lang.Boolean)true;
DocumentReader.Instance().ProcessParams().DebugSaveRFIDSession = (Java.Lang.Boolean)true;

// iOS
RGLDocReader.Shared.ProcessParams.DebugSaveLogs = true;
RGLDocReader.Shared.ProcessParams.DebugSaveCroppedImages = true;
RGLDocReader.Shared.ProcessParams.DebugSaveRFIDSession = true;

2. Now you can build and run your application and take the steps needed to reproduce the issue.

3. After the step 2 is performed, logs can be found in the app folder - you can print the path to it in the console like that:

Warning

Insert these lines of code after all the needed steps are completed.

let path = DocReader.shared.processParams.sessionLogFolder
print("Path: \(path ?? "nil")")
NSString *path = [RGLDocReader shared].processParams.sessionLogFolder;
NSLog(@"Path: %@", path);
val path = DocumentReader.Instance().processParams().sessionLogFolder
Log.d("Regula" , "Path: $path")
String path = DocumentReader.Instance().processParams().sessionLogFolder;
Log.d("Regula" , "Path: " + path);
print("Path: ${DocumentReader.instance.processParams.sessionLogFolder}");
DocumentReader.getProcessParams(str => {
  var json = JSON.parse(str)
  console.log("Path: " + json["sessionLogFolder"]);
}, _ => { })
DocumentReader.getProcessParams().then(str => {
  var json = JSON.parse(str)
  console.log("Path: " + json["sessionLogFolder"]);
})
DocumentReader.getProcessParams(function(str) {
  var json = JSON.parse(str)
  console.log("Path: " + json["sessionLogFolder"]);
}, function(e) { })
// Android
string path = DocumentReader.Instance().ProcessParams().SessionLogFolder;
Console.WriteLine("Path: " + path);

// iOS
var path = RGLDocReader.Shared.ProcessParams.SessionLogFolder;
Console.WriteLine("Path: " + path);

Collect Logs From Our Application

Our apps are available on App Store and Google Play.

  1. Open the app and wait until the app launches.
  2. Open Menu.
  3. Open Settings.
  4. Navigate to the Advanced section.
  5. Then to the Debug section.
  6. Enable settings according to the issue you experience:

    • If you are experiencing the issue with ID documents recognition or verification, choose the following settings:
      • Save event logs
      • Save cropped images
    • If you are experiencing the issue with RFID chip reading, choose the following settings:
      • Save event logs
      • Save cropped images
      • Save RFID session
  7. Perform other steps needed to reproduce the issue.

You can see logs on the results screen after the document recognition is finished or find them in the logs table: Home -> Menu -> Settings -> Advanced -> Debug -> Report event logs. Save logs and fill in the requested form with a clear and detailed description with as much information as possible including steps you’ve taken to solve the problem and conditions we should consider (such as failing on specific hardware or OS version).

How To Get Logs From the iOS Device?

  1. In Xcode, go to Window -> Devices and Simulators.

  2. Select the device.

  3. Select the app name under Installed Apps.
  4. Click the settings gearbox.
  5. Select Download container.

  6. In Finder, double finger tap the package and select Show package contents.

  7. Go to AppData -> tmp -> Regula.

Properties & Meaning

  • To write the SDK logs in the logcat, invoke:
DocReader.shared.processParams.logs = true
[RGLDocReader shared].processParams.logs = @YES;
DocumentReader.Instance().processParams().setLogs(true)
DocumentReader.Instance().processParams().setLogs(true);
DocumentReader.instance.processParams.logs = true;
DocumentReader.setProcessParams({
    logs: true,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    logs: true
});
DocumentReader.setProcessParams({
    logs: true,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().SetLogs((Java.Lang.Boolean)true);

// iOS
RGLDocReader.Shared.ProcessParams.Logs = true;
  • Turn on/off deep logs saving (in case of reading problems):
DocReader.shared.processParams.debugSaveLogs = true
[RGLDocReader shared].processParams.debugSaveLogs = @YES;
DocumentReader.Instance().processParams().debugSaveLogs = true
DocumentReader.Instance().processParams().debugSaveLogs = true;
DocumentReader.instance.processParams.debugSaveLogs = true;
DocumentReader.setProcessParams({
    debugSaveLogs: true,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    debugSaveLogs: true
});
DocumentReader.setProcessParams({
    debugSaveLogs: true,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().DebugSaveLogs = (Java.Lang.Boolean)true;

// iOS
RGLDocReader.Shared.ProcessParams.DebugSaveLogs = true;
  • Turn on/off input images saving (in case of reading problems):
DocReader.shared.processParams.debugSaveImages = true
[RGLDocReader shared].processParams.debugSaveImages = @YES;
DocumentReader.Instance().processParams().debugSaveImages = true
DocumentReader.Instance().processParams().debugSaveImages = true;
DocumentReader.instance.processParams.debugSaveImages = true;
DocumentReader.setProcessParams({
    debugSaveImages: true,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    debugSaveImages: true
});
DocumentReader.setProcessParams({
    debugSaveImages: true,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().DebugSaveImages = (Java.Lang.Boolean)true;

// iOS
RGLDocReader.Shared.ProcessParams.DebugSaveImages = true;
  • Turn on/off input images cropping and saving:
DocReader.shared.processParams.debugSaveCroppedImages = true
[RGLDocReader shared].processParams.debugSaveCroppedImages = @YES;
DocumentReader.Instance().processParams().debugSaveCroppedImages = true
DocumentReader.Instance().processParams().debugSaveCroppedImages = true;
DocumentReader.instance.processParams.debugSaveCroppedImages = true;
DocumentReader.setProcessParams({
    debugSaveCroppedImages: true,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    debugSaveCroppedImages: true
});
DocumentReader.setProcessParams({
    debugSaveCroppedImages: true,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().DebugSaveCroppedImages = (Java.Lang.Boolean)true;

// iOS
RGLDocReader.Shared.ProcessParams.DebugSaveCroppedImages = true;
  • Save the RFID session data to the file in binary format:
DocReader.shared.processParams.debugSaveRFIDSession = true
[RGLDocReader shared].processParams.debugSaveRFIDSession = @YES;
DocumentReader.Instance().processParams().debugSaveRFIDSession = true
DocumentReader.Instance().processParams().debugSaveRFIDSession = true;
DocumentReader.instance.processParams.debugSaveRFIDSession = true;
DocumentReader.setProcessParams({
    debugSaveRFIDSession: true,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    debugSaveRFIDSession: true
});
DocumentReader.setProcessParams({
    debugSaveRFIDSession: true,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().DebugSaveRFIDSession = (Java.Lang.Boolean)true;

// iOS
RGLDocReader.Shared.ProcessParams.DebugSaveRFIDSession = true;
  • Get the path to the folder of the current session. Before using this, save logs. Each new session provides a different path:
DocReader.shared.processParams.sessionLogFolder
[RGLDocReader shared].processParams.sessionLogFolder
DocumentReader.Instance().processParams().sessionLogFolder
DocumentReader.Instance().processParams().sessionLogFolder
DocumentReader.instance.processParams.sessionLogFolder;
DocumentReader.getProcessParams(str => {
  var json = JSON.parse(str)
  var sessionLogFolder = json["sessionLogFolder"]
}, _ => { })
DocumentReader.getProcessParams().then(str => {
  var json = JSON.parse(str)
  var sessionLogFolder = json["sessionLogFolder"]
})
DocumentReader.getProcessParams(function(str) {
  var json = JSON.parse(str)
  var sessionLogFolder = json["sessionLogFolder"]
}, function(e) { })
// Android
DocumentReader.Instance().ProcessParams().SessionLogFolder

// iOS
RGLDocReader.Shared.ProcessParams.SessionLogFolder
  • Remove personal information from logs:
DocReader.shared.processParams.depersonalizeLog = true
[RGLDocReader shared].processParams.depersonalizeLog = @YES;
DocumentReader.Instance().processParams().depersonalizeLog = true
DocumentReader.Instance().processParams().depersonalizeLog = true;
DocumentReader.instance.processParams.depersonalizeLog = true;
DocumentReader.setProcessParams({
    depersonalizeLog: true,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    depersonalizeLog: true
});
DocumentReader.setProcessParams({
    depersonalizeLog: true,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().DepersonalizeLog = (Java.Lang.Boolean)true;

// iOS
RGLDocReader.Shared.ProcessParams.DepersonalizeLog = true;

Next Steps