LogCamp is analytics and logger library written in Objective-C
CocoaPods is a dependency manager for Cocoa projects.
pod 'LogCamp', :git => 'https://github.com/PrasadPotale/KahunaLogCamp.git', :tag => ‘3.2.7’
KALogger.startSessionWithAppId("APP_ID", andAppKey: "APP_KEY", andServerUrl: "SERVER_URL")
Add swift#import <LogCamp/KahunaAnalytics.h>
into PROJECT_NAME-Bridging-Header.h file
[KALogger startSessionWithAppId:@"APP_ID" andAppKey:@"APP_KEY" andServerUrl:@"SERVER_URL"];
By default it will use LogCamp API server url.
To log webservice failure's
KALogger.sendDeviceLogsToServerWithRequest("WEBSERVICE_REQUEST_JSON_STRING", withResponse: "WEBSERVICE_RESPONSE_JSON_STRING", urlPath: "WEBSERVICE_URL", userName: "USERNAME / EMAIL", errorCode: ERROR_CODE)
E.g. : KALogger.sendDeviceLogsToServerWithRequest("Sample Request Format", withResponse: "Sample Response Format", urlPath: "http://google.com", userName: "[email protected]", errorCode: NSNumber(double:5.0))
To log timestamp details of webservice
KALogger.sendTimeStampLogsToServerForServiceType("SERVICE_TYPE", responseStatus: "SUCCESS / FAILURE / UNKNOWN", mobileRequestStartTime: "2016-11-16T17:03:45", mobileResponseReceiveTime: "2016-11-16T17:03:45", mobileServiceParseTime: "2016-11-16T17:03:45", serverRequestReceiveTime: "2016-11-16T17:03:45", serverResponseStartTime: "2016-11-16T17:03:45")
E.g. : KALogger.sendTimeStampLogsToServerForServiceType("Login", responseStatus: "Success", mobileRequestStartTime: "2016-11-16T17:03:45", mobileResponseReceiveTime: "2016-11-16T17:03:49", mobileServiceParseTime: "2016-11-16T17:03:49", serverRequestReceiveTime: "2016-11-16T17:03:45", serverResponseStartTime: "2016-11-16T17:03:47")
Can be used to add Ratings to app or send feedback, issue screenshots
KALogger.addRatings(RATINGS_NUMBER, summary: "RATINGS_SUMMARY", comment: "RATINGS_COMMENT", userId: "USERID / USEREMAIL", username: "USERNAME", imagePaths: ARRAY_OF_IMAGES)
E.g. KALogger.addRatings(NSNumber(double: 4.0), summary: "Test Ratings", comment: "Test Comment", userId: "[email protected]", username: "Test User", imagePaths: ["image local directory path"])
To track specific events into app, E.g. User Added Item into Cart, User Clicked on Social Login Etc.
KALogger.logEvent("EVENT_NAME", withParameters: ["Key1":"Value1", "Key2":"Value2"])
To add logs use
KALogger.log("Test Message")
In Objective-C
KLog("Test Message");