Splunk MINT SDK for Android (Legacy)

Splunk MINT SDK for Android Developer Guide

Acrobat logo Download manual as PDF


Splunk MINT is no longer available for purchase as of January 29, 2021. Customers who have already been paying to ingest and process MINT data in Splunk Enterprise will continue to receive support until December 31, 2021, which is End of Life for all MINT products: App, Web Service (Management Console), SDK and Add-On.
This documentation does not apply to the most recent version of Splunk MINT SDK for Android (Legacy). For documentation on the most recent version, go to the latest release.
Acrobat logo Download topic as PDF

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(MyActivity.this, "YOUR_API_KEY");

    setContentView(R.layout.main);

    if (APPDEBUGMODE) {
        Log.info("myapp", "onCreate called!");
        Splunk.enableDebugLog();
    }
}
Last modified on 02 March, 2016
PREVIOUS
Report LogCat output
  NEXT
Integrate WebView monitoring

This documentation applies to the following versions of Splunk MINT SDK for Android (Legacy): 5.0.x, 5.1.x


Was this documentation topic helpful?


You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters