Remote logger for React Native apps
Remote logger helps you to get the applications logs without asking the users. Only send logs to Apptics from the release builds, logs in debug builds will only be printed on the console.
Before you begin, ensure that Apptics is integrated into your project by following the Integration Guide.
Enable/Disable remote logger
Remote logging is disabled by default. You can use the below methods to enable/disable or get the current state of Remote Logger.
Copiedimport {Apptics, APLogger, APLogLevel} from '@zoho_apptics/apptics-react-native';
// to enable logger
APLogger.enable();
// to disable logger
APLogger.disable();
// to get the current status
APLogger.isEnabled();
Send logs
- Use the below method to send logs to Apptics.
Copiedimport {Apptics, APLogger, APLogLevel} from '@zoho_apptics/apptics-react-native';
let prop = {'Plan': 'Premium'};
APLogger.log("log from verbose testing", ["mango", "apple"], prop);
APLogger.debug("log from debug");
APLogger.info("log from info");
APLogger.warn("log from warn");
APLogger.error("log from error");
Note: The filename and method name captured will be obfuscated.