Splunk MINT SDK for iOS (Legacy)

Splunk MINT SDK for iOS Developer Guide

Acrobat logo Download manual as PDF

This documentation does not apply to the most recent version of MintIOSSDK. Click here for the latest version.
Acrobat logo Download topic as PDF

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 initAndStartSession::

  • 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] initAndStartSession:@"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 10 March, 2015
Add and report events
Report handled exceptions

This documentation applies to the following versions of Splunk MINT SDK for iOS (Legacy): 4.0.x, 4.1.x, 4.2.x, 4.3.x, 4.4.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