Splunk MINT SDK for iOS (Legacy)

Splunk MINT SDK for iOS Developer Guide

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.

Dispatch system log messages

Print device log messages

With the MintLog function you can print messages to the console using the Apple Logging System (ALS). When in debug mode, all messages are displayed in the console window and printed to the device log. When in release mode, all messages are displayed in the console window, but only notice messages and higher are printed to the device log.

Log Level Suggested Usage
Emergency (level 0) The highest priority, usually reserved for catastrophic failures and reboot notices.
Alert (level 1) A serious failure in a key system.
Critical (level 2) A failure in a key system.
Error (level 3) Something has failed.
Warning (level 4) Something is amiss and might fail if not corrected.
Notice (level 5) Things of moderate interest to the user or administrator.
Info (level 6) The lowest priority that you would normally log, and purely informational in nature.
Debug (level 7) The lowest priority, and normally not logged except for messages from the kernel.

Report console log messages

To dispatch the latest NSLog messages with your unhandled crash, use the following methods before calling initAndStartSessionWithAPIKey:

  • enableMintLoggingCache: enables log caching.
  • enableLogging: attaches the cached log to exceptions.
  • setLogging: specifies the number of lines to include.

Example code

// Objective-C

[[Mint sharedInstance] enableMintLoggingCache:YES];

[[Mint sharedInstance] enableLogging:YES];

[[Mint sharedInstance] setLogging:8];

[[Mint sharedInstance] initAndStartSessionWithAPIKey:@"API_KEY"];
// Swift 





Using this code, your unhandled crash reports will include the last eight NSLog messages with the request, which you can then examine from the error instances.

Last modified on 05 November, 2019
Add and report events   Report handled exceptions

This documentation applies to the following versions of Splunk MINT SDK for iOS (Legacy): 5.2.x

Was this topic useful?

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