Report debugging messages
You can display debug messages during testing to examine application errors and debug information before you deploy to production. However, you should disable this feature in production.
- To display debug messages, use the enableDebugLog() method as follows:
Mint.enableDebugLog();
Example code
Use a public static Boolean to integrate with a build system. A JVM can detect this setting so you can remove unused code before deploying to production.
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // TODO: Update with your API key Mint.initAndStartSession(this.getApplication(), "YOUR_API_KEY"); setContentView(R.layout.main); if (APPDEBUGMODE) { Log.info("myapp", "onCreate called!"); Splunk.enableDebugLog(); } }
Report LogCat output | View memory trim notifications |
This documentation applies to the following versions of Splunk MINT™ SDK for Android (Legacy): 5.2.x
Feedback submitted, thanks!