Splunk MINT SDK for iOS  5.1
 All Classes Files Functions Variables Properties Macros
Mint.h File Reference
#import <Foundation/Foundation.h>
#include <pthread.h>
#import "MintLimitedExtraData.h"
#import "MintEnums.h"
#import "MintUtilities.h"

Go to the source code of this file.

Classes

class  Mint
 

Macros

#define MintLogException(exception, extradata)   [[Mint sharedInstance] logException:exception extraData:extradata];
 
#define MINT_METHOD_TRACE_START
 
#define MINT_METHOD_TRACE_STOP
 
#define MINT_NONARC_METHOD_TRACE_STOP
 

Variables

NSString *const SPLAppEnvRelease
 
NSString *const SPLAppEnvStaging
 
NSString *const SPLAppEnvUserAcceptanceTesting
 
NSString *const SPLAppEnvTesting
 
NSString *const SPLAppEnvDevelopment
 

Macro Definition Documentation

#define MINT_METHOD_TRACE_START
Value:
NSMutableDictionary *mintTraceInfo = [[NSMutableDictionary alloc] init];\
[mintTraceInfo setObject:[NSString stringWithFormat:@"%s", __FUNCTION__] forKey:@"method"];\
[mintTraceInfo setObject:@(getCurrentTimeInNanos()) forKey:@"startTime"];\
[mintTraceInfo setObject:@(pthread_mach_thread_np(pthread_self())) forKey:@"threadID"];\

MINT_METHOD_TRACE_START and MINT_METHOD_TRACE_STOP macro logs a method invocation with class name, method name and elapsed time. If you are not using ARC, use MINT_NONARC_METHOD_TRACE_STOP macro to avoid memory leaks when you stop the trace.

#define MINT_METHOD_TRACE_STOP
Value:
[mintTraceInfo setObject:@(getCurrentTimeInNanos()) forKey:@"endTime"];\
[[Mint sharedInstance] logMethodTrace:mintTraceInfo];\
Definition: Mint.h:65
#define MINT_NONARC_METHOD_TRACE_STOP
Value:
[mintTraceInfo setObject:@(getCurrentTimeInNanos()) forKey:@"endTime"];\
[[Mint sharedInstance] logMethodTrace:mintTraceInfo];\
[mintTraceInfo release];\
mintTraceInfo = nil;\
Definition: Mint.h:65
#define MintLogException (   exception,
  extradata 
)    [[Mint sharedInstance] logException:exception extraData:extradata];

MintLogException is a helper function that calls the [[Mint sharedInstance] logException:extraData:]. This function logs a handled exception with any optional data.

Parameters
exceptionThe handled exception instance.
extradataThe extra data to include in the request.
Returns
void. Nothing to return.

Variable Documentation

NSString* const SPLAppEnvDevelopment
NSString* const SPLAppEnvRelease

Predefined application environments.

NSString* const SPLAppEnvStaging
NSString* const SPLAppEnvTesting
NSString* const SPLAppEnvUserAcceptanceTesting