Add and report events
In addition to reporting the sequence of events leading up to an app crash, Splunk MINT can report events that are not associated with a crash. For example, if your application asks users to make a selection, you can report the user's selection. You can also include the log level with the event.
- To report an event, use the logEventAsyncWithTag:completionBlock: method.
Add as many events as you like to track virtually any user activity on your app. To view the event data, see the Events dashboard in Splunk MINT Management Console.
Example code
// Objective-C [[Mint sharedInstance] logEventAsyncWithTag:@"Log Custom Event tag" completionBlock:^(MintLogResult *splunkLogResult) { NSString* logResultState = mintLogResult.resultState == OKResultState ? @"OK" : @"Error" NSLog(@"Log result: %@", logResultState) }];
// Swift Mint.sharedInstance().logEventAsyncWithTag("Log Event Async With Tag", completionBlock: {(logResult: MintLogResult!) -> Void in let result = logResult.resultState.value == OKResultState.value ? "OK" : "Failed" println("Log Event Result: \(result)"); } )
Monitor transactions | Dispatch system log messages |
This documentation applies to the following versions of Splunk MINT™ SDK for iOS (EOL): 4.0.x
Feedback submitted, thanks!