Inherits from NSObject
Declared in CCHLog.h
CCHLog.m

Overview

The CCHLog class is used to log information to the ContextHub server logs.

Note: These logs are not cached locally. You must have an internet connection when this method is called if you want the logs to show on the server.

Class Methods

sharedInstance

The singleton instance of CCHLog.

+ (instancetype)sharedInstance

Return Value

The singleton instance of CCHLog.

Declared In

CCHLog.h

Instance Methods

log:userInfo:completionHandler:

Creates a log on the ContextHub server.

- (void)log:(NSString *)message userInfo:(NSDictionary *)userInfo completionHandler:(void ( ^ ) ( NSError *error ))completionHandler

Parameters

message

The string message that you want to log.

userInfo

(optional) The user defined data that you want to log. This item must be a valid JSON object. See NSJSONSerialization:isValidJSONObject.

completionHandler

(optional) Called when the request completes. If an error occurs, the NSError will be passed to the block.

Discussion

Note: These logs are not cached locally. You must have an internet connection when this method is called if you want the logs to show on the server.

Declared In

CCHLog.h