Skip to content

Instantly share code, notes, and snippets.

@CHLibrarian
Last active August 29, 2015 14:10
Show Gist options
  • Save CHLibrarian/1976bfd8ef49b7c44532 to your computer and use it in GitHub Desktop.
Save CHLibrarian/1976bfd8ef49b7c44532 to your computer and use it in GitHub Desktop.
Application Services Logging
NSString *logMessage = @"Logging message";
NSDictionary *logDictionary = @{@"key1": @"value1", @"key2": @"value2"};
// Logging a message and a custom valid-JSON dictionary to ContextHub
[[CCHLog sharedInstance] log:logMessage userInfo:logDictionary completionHandler:(void (^)(NSError *error))completionHandler {
if (!error) {
NSLog(@"Message logged successfully");
} else {
NSLog(@"Failed to log message to Contexthub");
}
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment