Use this method to set log level verbosity and toggle logging to file:
AbtoPhoneCfg.setLogLevel(logLevel, logToFile);
- – logLevel must be in range 0..7 (0..5 on older SDK’s), 0 to disable logging and 1-7 to increase verbosity.
- – logToFile is a boolean value to toggle output to file
Recommended way to enable verbose logging:
AbtoPhoneCfg.setLogLevel(7, true);
...
abtoPhone.initialize(true);
// or
// abtoPhone.initializeForeground(notification);
By default SDK output log information to Logcat.
To output information into file:
- 1) set logToFile option to true
- 2) check that AndroidManifest.xml includes permission:
- 3) for Android 6-9 also need to ask for WRITE_EXTERNAL_STORAGE in runtime
Log files are located in [SD CARD]/Downloads/[App package name]/logs on Android 10 and above (does not require point 2 and 3), whereas on older versions of Android logs are located in [SD CARD]/[App package name]/logs folder
Posted in: FAQ