This module enables centralize logging for your App. Log service allows different levels to log a message e.g. info, debug, fatal, error etc. You can fetch logs based on different parameters such as module, level, message, date range etc.
import com.shephertz.app42.paas.sdk.android.App42API; import com.shephertz.app42.paas.sdk.android.App42Response; import com.shephertz.app42.paas.sdk.android.App42Exception; import com.shephertz.app42.paas.sdk.android.App42BadParameterException; import com.shephertz.app42.paas.sdk.android.App42NotFoundException; import com.shephertz.app42.paas.sdk.android.log.Log; import com.shephertz.app42.paas.sdk.android.log.LogService;using com.shephertz.app42.paas.sdk.windows; using com.shephertz.app42.paas.sdk.windows.log;#import "Shephertz_App42_iOS_API/Shephertz_App42_iOS_API.h"#import "Shephertz_App42_iOS_API/Shephertz_App42_iOS_API.h"import com.shephertz.app42.paas.sdk.java.App42API; import com.shephertz.app42.paas.sdk.java.App42Response; import com.shephertz.app42.paas.sdk.java.App42Exception; import com.shephertz.app42.paas.sdk.java.App42BadParameterException; import com.shephertz.app42.paas.sdk.java.App42NotFoundException; import com.shephertz.app42.paas.sdk.java.log.Log; import com.shephertz.app42.paas.sdk.java.log.LogService;using com.shephertz.app42.paas.sdk.csharp; using com.shephertz.app42.paas.sdk.csharp.log;<script type="text/javascript" src="App42-all-x.x.x.min.js">Coming SoonComing Soonusing com.shephertz.app42.paas.sdk.csharp; using com.shephertz.app42.paas.sdk.csharp.log;include_once '../App42Response.php'; include_once '../App42Exception.php'; include_once '../App42BadParameterException.php'; include_once '../App42NotFoundException.php'; include_once '../App42Log.php'; include_once '../LogService.php';Coming SoonComing Soonimport com.shephertz.app42.paas.sdk.as3.App42API; import com.shephertz.app42.paas.sdk.as3.App42Response; import com.shephertz.app42.paas.sdk.as3.App42Exception; import com.shephertz.app42.paas.sdk.as3.App42BadParameterException; import com.shephertz.app42.paas.sdk.as3.App42NotFoundException; import com.shephertz.app42.paas.sdk.as3.log.Log; import com.shephertz.app42.paas.sdk.as3.log.LogService; import com.shephertz.app42.paas.sdk.as3.log.Message;Coming Soonimport com.shephertz.app42.paas.sdk.jme.App42API; import com.shephertz.app42.paas.sdk.jme.App42Response; import com.shephertz.app42.paas.sdk.jme.App42Exception; import com.shephertz.app42.paas.sdk.jme.App42BadParameterException; import com.shephertz.app42.paas.sdk.jme.App42NotFoundException; import com.shephertz.app42.paas.sdk.jme.log.Log; import com.shephertz.app42.paas.sdk.jme.log.LogService;
In order to use the various functions available in a specific API, the developer has to initialize with App42API by passing the apiKey and the secretKey which will become available after the app creation from AppHQ dashboard.
Required Parameters
apiKey - The Application key given when the application was created.
secretKey - The secret key corresponding to the application key given when the application was created.
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");App42API.Initialize("API_KEY","SECRET_KEY");[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"];App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY")App42API.initialize("API_KEY","SECRET_KEY");App42API.Initialize("API_KEY","SECRET_KEY");App42.initialize("API_KEY","SECRET_KEY");App42API:initialize("API_KEY","SECRET_KEY");App42API::Initialize("API_KEY", "SECRET_KEY");App42API.Initialize("API_KEY","SECRET_KEY");App42API::initialize("API_KEY","SECRET_KEY");App42API::Initialize("API_KEY", "SECRET_KEY");api = App42::ServiceAPI.new("API_KEY","SECRET_KEY")App42API.initialize("API_KEY","SECRET_KEY");Coming SoonApp42API.initialize("API_KEY","SECRET_KEY");
After initialization, the developer will have to call the buildXXXService method on App42API to get the instance of the particular API that they wish to build. For example, to build an instance of LogService, buildLogService() method needs to be called.
LogService logService = App42API.buildLogService();LogService logService = App42API.BuildLogService();LogService *logService = [App42API buildLogService];let logService = App42API.buildLogService() as? LogServiceLogService logService = App42API.buildLogService();LogService logService = App42API.BuildLogService();var logService = new App42Log();Coming SoonComing SoonLogService logService = App42API.BuildLogService();$logService = App42API::buildLogService();Coming SoonComing Soonvar logService:LogService = App42API.buildLogService();Coming SoonLogService logService = App42API.buildLogService();
Log the info message.
Required Parameters
message - The message to be logged.
moduleName - A module name for which the message is getting logged.
String message = "message"; String moduleName = "moduleName"; App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.info(message, moduleName, new App42CallBack() { public void onSuccess(Object response) { Log log = (Log)response; ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });String message = "message"; String moduleName = "moduleName"; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.Info(message,moduleName,new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { Console.WriteLine("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { Console.WriteLine(" jsonResponse is : " + log.GetMessageList()[i].ToString()); Console.WriteLine(" Message is : " + log.GetMessageList()[i].GetMessage()); Console.WriteLine(" Module is : " + log.GetMessageList()[i].GetModule()); Console.WriteLine(" Log Type is : " + log.GetMessageList()[i].GetType()); Console.WriteLine(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } String jsonResponse = log.ToString(); } }NSString *message = @"message"; NSString *moduleName = @"moduleName"; [App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService info:message module:moduleName completionBlock:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { Log *response = (Log*)responseObj; NSLog(@"Response is %@" , response.strResponse); for (LogMessage *message in response.logMessageArray) { NSLog(@"module is =%@",message.module); NSLog(@"logTime is = %@",message.logTime); } } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];let message = "message" let moduleName = "moduleName" App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.info(message, module:moduleName, completionBlock: { (success, response, exception) -> Void in if (success) { let log = response as! Log NSLog("Response is %@" , log.strResponse); for message in log.logMessageArray { NSLog("module is =%@",message.module); NSLog("logTime is = %@",message.logTime); } } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })String message = "message"; String moduleName = "moduleName"; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.info(message,moduleName); ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } String jsonResponse = log.toString();String message = "message"; String moduleName = "moduleName"; App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.Info(message,moduleName, new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { App42Log.Console(" jsonResponse is : " + log.GetMessageList()[i].ToString()); App42Log.Console(" Message is : " + log.GetMessageList()[i].GetMessage()); App42Log.Console(" Module is : " + log.GetMessageList()[i].GetModule()); App42Log.Console(" Log Type is : " + log.GetMessageList()[i].GetType()); App42Log.Console(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } App42Log.Console("Success : " + log.ToString()); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }Not AvailableComing SoonComing SoonString message = "message"; String moduleName = "moduleName"; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); Log log = logService.Info(message,moduleName); Console.WriteLine("message is " + log.GetMessageList()[0].GetMessage()); Console.WriteLine("module is " + log.GetMessageList()[0].GetModule()); String jsonResponse = log.ToString();$message = "message"; $moduleName = "moduleName"; App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $log = $logService->info($message,$moduleName); $message = $log->getMessageList(); foreach ($message as $messageList) { print_r("msg is : " . $messageList->getMessage()); print_r("module is : " . $messageList->getModule()); print_r("type is : " . $messageList->getType()); print_r("logTime is : " . $messageList->getLogTime()); } $jsonResponse = $log->toString();Coming SoonComing Soonvar message:String = "message"; var moduleName:String = "moduleName"; App42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.info(message , moduleName,new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { var log:Log = Log(response); if(log.getMessageList().length > 0) { for(var i:int=0;i<log.getMessageList().length;i++) { trace("Log Time is : " + Message(log.getMessageList()[i]).getLogTime()); trace("Message is " + Message(log.getMessageList()[i]).getMessage()); trace("Module is " + Message(log.getMessageList()[i]).getModule()); trace("Get Type is " + Message(log.getMessageList()[i]).getType()); } } } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonString message = "message"; String moduleName = "moduleName"; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.info(message,moduleName); System.out.println("message is " + ((Message)log.getMessageList().elementAt(0)).getMessage()); System.out.println("module is " + ((Message)log.getMessageList().elementAt(0)).getModule()); String jsonResponse = log.toString();
Logs the debug message.
Required Parameters
message - The message to be logged.
moduleName - A module name for which the message is getting logged.
String message = "message"; String moduleName = "moduleName"; App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.debug(message, moduleName, new App42CallBack() { public void onSuccess(Object response) { Log log = (Log)response; ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });String message = "message"; String moduleName = "moduleName"; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.Debug(message,moduleName,new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { Console.WriteLine("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { Console.WriteLine(" jsonResponse is : " + log.GetMessageList()[i].ToString()); Console.WriteLine(" Message is : " + log.GetMessageList()[i].GetMessage()); Console.WriteLine(" Module is : " + log.GetMessageList()[i].GetModule()); Console.WriteLine(" Log Type is : " + log.GetMessageList()[i].GetType()); Console.WriteLine(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } String jsonResponse = log.ToString(); } }NSString *message = @"message"; NSString *moduleName = @"moduleName"; [App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService debug:message module:moduleName completionBlock:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { Log *response = (Log*)responseObj; NSLog(@"Response is %@" , response.strResponse); for (LogMessage *message in response.logMessageArray) { NSLog(@"module is =%@",message.module); NSLog(@"logTime is = %@",message.logTime); } } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];let message = "message" let moduleName = "moduleName" App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.debug(message, module:moduleName, completionBlock: { (success, response, exception) -> Void in if (success) { let log = response as! Log NSLog("Response is %@" , log.strResponse); for message in log.logMessageArray { NSLog("module is =%@",message.module); NSLog("logTime is = %@",message.logTime); } } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })String message = "message"; String moduleName = "moduleName"; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.debug(message,moduleName); ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } String jsonResponse = log.toString();String message = "message"; String moduleName = "moduleName"; App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.Debug(message,moduleName, new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { App42Log.Console(" jsonResponse is : " + log.GetMessageList()[i].ToString()); App42Log.Console(" Message is : " + log.GetMessageList()[i].GetMessage()); App42Log.Console(" Module is : " + log.GetMessageList()[i].GetModule()); App42Log.Console(" Log Type is : " + log.GetMessageList()[i].GetType()); App42Log.Console(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } App42Log.Console("Success : " + log.ToString()); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }Not AvailableComing SoonComing SoonString message = "message"; String moduleName = "moduleName"; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); Log log = logService.Debug(message,moduleName); Console.WriteLine("message is " + log.GetMessageList()[0].GetMessage()); Console.WriteLine("module is " + log.GetMessageList()[0].GetModule()); String jsonResponse = log.ToString();$message = "message"; $moduleName = "moduleName"; App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $log = $logService->debug($message,$moduleName); $message = $log->getMessageList(); foreach ($message as $messageList) { print_r("msg is : " . $messageList->getMessage()); print_r("module is : " . $messageList->getModule()); print_r("type is : " . $messageList->getType()); print_r("logTime is : " . $messageList->getLogTime()); } $jsonResponse = $log->toString();Coming SoonComing Soonvar message:String = "message"; var moduleName:String = "moduleName"; App42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.debug(message , moduleName,new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { var log:Log = Log(response); if(log.getMessageList().length > 0) { for(var i:int=0;i<log.getMessageList().length;i++) { trace("Log Time is : " + Message(log.getMessageList()[i]).getLogTime()); trace("Message is " + Message(log.getMessageList()[i]).getMessage()); trace("Module is " + Message(log.getMessageList()[i]).getModule()); trace("Get Type is " + Message(log.getMessageList()[i]).getType()); } } } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonString message = "message"; String moduleName = "moduleName"; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.debug(message,moduleName); System.out.println("message is " + ((Message)log.getMessageList().elementAt(0)).getMessage()); System.out.println("module is " + ((Message)log.getMessageList().elementAt(0)).getModule()); String jsonResponse = log.toString();
Logs the error message.
Required Parameters
message - The message to be logged.
moduleName - A module name for which the message is getting logged.
String message = "message"; String moduleName = "moduleName"; App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.error(message, moduleName, new App42CallBack() { public void onSuccess(Object response) { Log log = (Log)response; System.out.println(response); ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });String message = "message"; String moduleName = "moduleName"; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.Error(message,moduleName,new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { Console.WriteLine("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { Console.WriteLine(" jsonResponse is : " + log.GetMessageList()[i].ToString()); Console.WriteLine(" Message is : " + log.GetMessageList()[i].GetMessage()); Console.WriteLine(" Module is : " + log.GetMessageList()[i].GetModule()); Console.WriteLine(" Log Type is : " + log.GetMessageList()[i].GetType()); Console.WriteLine(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } String jsonResponse = log.ToString(); } }NSString *message = @"message"; NSString *moduleName = @"moduleName"; [App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService error:message module:moduleName completionBlock:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { Log *response = (Log*)responseObj; NSLog(@"Response is %@" , response.strResponse); for (LogMessage *message in response.logMessageArray) { NSLog(@"module is =%@",message.module); NSLog(@"logTime is = %@",message.logTime); } } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];let message = "message" let moduleName = "moduleName" App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.error(message, module:moduleName, completionBlock: { (success, response, exception) -> Void in if (success) { let log = response as! Log NSLog("Response is %@" , log.strResponse) for message in log.logMessageArray { NSLog("module is =%@",message.module) NSLog("logTime is = %@",message.logTime) } } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })String message = "message"; String moduleName = "moduleName"; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.error(message,moduleName); ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } String jsonResponse = log.toString();String message = "message"; String moduleName = "moduleName"; App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.Error(message,moduleName, new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { App42Log.Console(" jsonResponse is : " + log.GetMessageList()[i].ToString()); App42Log.Console(" Message is : " + log.GetMessageList()[i].GetMessage()); App42Log.Console(" Module is : " + log.GetMessageList()[i].GetModule()); App42Log.Console(" Log Type is : " + log.GetMessageList()[i].GetType()); App42Log.Console(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } App42Log.Console("Success : " + log.ToString()); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }Not AvailableComing SoonComing SoonString message = "message"; String moduleName = "moduleName"; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); Log log = logService.Error(message,moduleName); Console.WriteLine("message is " + log.GetMessageList()[0].GetMessage()); Console.WriteLine("module is " + log.GetMessageList()[0].GetModule()); String jsonResponse = log.ToString();$message = "message"; $moduleName = "moduleName"; App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $log = $logService->error($message,$moduleName); $message = $log->getMessageList(); foreach ($message as $messageList) { print_r("msg is : " . $messageList->getMessage()); print_r("module is : " . $messageList->getModule()); print_r("type is : " . $messageList->getType()); print_r("logTime is : " . $messageList->getLogTime()); } $jsonResponse = $log->toString();Coming SoonComing Soonvar message:String = "message"; var moduleName:String = "moduleName"; App42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.error(message , moduleName,new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { var log:Log = Log(response); if(log.getMessageList().length > 0) { for(var i:int=0;i<log.getMessageList().length;i++) { trace("Log Time is : " + Message(log.getMessageList()[i]).getLogTime()); trace("Message is " + Message(log.getMessageList()[i]).getMessage()); trace("Module is " + Message(log.getMessageList()[i]).getModule()); trace("Get Type is " + Message(log.getMessageList()[i]).getType()); } } } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonString message = "message"; String moduleName = "moduleName"; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.error(message,moduleName); System.out.println("message is " + ((Message)log.getMessageList().elementAt(0)).getMessage()); System.out.println("module is " + ((Message)log.getMessageList().elementAt(0)).getModule()); String jsonResponse = log.toString();
Log the fatal message.
Required Parameters
message - Message to be logged.
moduleName - Module name for which the message is getting logged.
String message = "message"; String moduleName = "moduleName"; App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.fatal(message, moduleName, new App42CallBack() { public void onSuccess(Object response) { Log log = (Log)response; ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });String message = "message"; String moduleName = "moduleName"; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.Fatal(message, moduleName, new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { Console.WriteLine("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { Console.WriteLine(" jsonResponse is : " + log.GetMessageList()[i].ToString()); Console.WriteLine(" Message is : " + log.GetMessageList()[i].GetMessage()); Console.WriteLine(" Module is : " + log.GetMessageList()[i].GetModule()); Console.WriteLine(" Log Type is : " + log.GetMessageList()[i].GetType()); Console.WriteLine(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } String jsonResponse = log.ToString(); } }NSString *message = @"message"; NSString *moduleName = @"moduleName"; [App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService fatal:message module:moduleName completionBlock:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { Log *response = (Log*)responseObj; NSLog(@"Response is %@" , response.strResponse); for (LogMessage *message in response.logMessageArray) { NSLog(@"module is =%@",message.module); NSLog(@"logTime is = %@",message.logTime); } } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];let message = "message" let moduleName = "moduleName" App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.fatal(message, module:moduleName, completionBlock: { (success, response, exception) -> Void in if (success) { let log = response as! Log NSLog("Response is %@" ,log.strResponse); for message in log.logMessageArray { NSLog("module is =%@",message.module); NSLog("logTime is = %@",message.logTime); } } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })String message = "message"; String moduleName = "moduleName"; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fatal(message,moduleName); ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } String jsonResponse = log.toString();String message = "message"; String moduleName = "moduleName"; App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.Fatal(message,moduleName new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { App42Log.Console(" jsonResponse is : " + log.GetMessageList()[i].ToString()); App42Log.Console(" Message is : " + log.GetMessageList()[i].GetMessage()); App42Log.Console(" Module is : " + log.GetMessageList()[i].GetModule()); App42Log.Console(" Log Type is : " + log.GetMessageList()[i].GetType()); App42Log.Console(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } App42Log.Console("Success : " + log.ToString()); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }Not AvailableComing SoonComing SoonString message = "message"; String moduleName = "moduleName"; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); Log log = logService.Fatal(message,moduleName); Console.WriteLine("message is " + log.GetMessageList()[0].GetMessage()); Console.WriteLine("module is " + log.GetMessageList()[0].GetModule()); String jsonResponse = log.ToString();$message = "message"; $moduleName = "moduleName"; App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $log = $logService->fatal($message,$moduleName); $message = $log->getMessageList(); foreach ($message as $messageList) { print_r("msg is : " . $messageList->getMessage()); print_r("module is : " . $messageList->getModule()); print_r("type is : " . $messageList->getType()); print_r("logTime is : " . $messageList->getLogTime()); } $jsonResponse = $log->toString();Coming SoonComing Soonvar message:String = "message"; var moduleName:String = "moduleName"; App42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.fatal(message , moduleName,new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { var log:Log = Log(response); if(log.getMessageList().length > 0) { for(var i:int=0;i<log.getMessageList().length;i++) { trace("Log Time is : " + Message(log.getMessageList()[i]).getLogTime()); trace("Message is " + Message(log.getMessageList()[i]).getMessage()); trace("Module is " + Message(log.getMessageList()[i]).getModule()); trace("Get Type is " + Message(log.getMessageList()[i]).getType()); } } } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonString message = "message"; String moduleName = "moduleName"; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fatal(message,moduleName); System.out.println("message is " + ((Message)log.getMessageList().elementAt(0)).getMessage()); System.out.println("module is " + ((Message)log.getMessageList().elementAt(0)).getModule()); String jsonResponse = log.toString();
Fetch the log messages based on the module.
Required Parameters
moduleName - Module name for which the messages have to be fetched.
String moduleName = "moduleName"; App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.fetchLogsByModule(moduleName, new App42CallBack() { public void onSuccess(Object response) { Log log = (Log)response; ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });String moduleName = "moduleName"; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByModule(moduleName,new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { Console.WriteLine("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { Console.WriteLine(" jsonResponse is : " + log.GetMessageList()[i].ToString()); Console.WriteLine(" Message is : " + log.GetMessageList()[i].GetMessage()); Console.WriteLine(" Module is : " + log.GetMessageList()[i].GetModule()); Console.WriteLine(" Log Type is : " + log.GetMessageList()[i].GetType()); Console.WriteLine(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } String jsonResponse = log.ToString(); } }NSString *moduleName = @"moduleName"; [App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService fetchLogsByModule:moduleName completionBlock:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { Log *response = (Log*)responseObj; NSLog(@"Response is %@" , response.strResponse); for (LogMessage *message in response.logMessageArray) { NSLog(@"module is =%@",message.module); NSLog(@"logTime is = %@",message.logTime); } } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];let message = "message" let moduleName = "moduleName" App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.fetchLogsByModule(moduleName, completionBlock: { (success, response, exception) -> Void in if (success) { let log = response as! Log NSLog("Response is %@" , log.strResponse); for message in log.logMessageArray { NSLog("module is =%@",message.module); NSLog("logTime is = %@",message.logTime); } } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })String moduleName = "moduleName"; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogsByModule(moduleName); ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } String jsonResponse = log.toString();String moduleName = "moduleName"; App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByModule(moduleName, new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { App42Log.Console(" jsonResponse is : " + log.GetMessageList()[i].ToString()); App42Log.Console(" Message is : " + log.GetMessageList()[i].GetMessage()); App42Log.Console(" Module is : " + log.GetMessageList()[i].GetModule()); App42Log.Console(" Log Type is : " + log.GetMessageList()[i].GetType()); App42Log.Console(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } App42Log.Console("Success : " + log.ToString()); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }Not AvailableComing SoonComing SoonString moduleName = "moduleName"; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); Log log = logService.FetchLogsByModule(moduleName); Console.WriteLine("message is " + log.GetMessageList()[0].GetMessage()); Console.WriteLine("module is " + log.GetMessageList()[0].GetModule()); String jsonResponse = log.ToString();$moduleName = "moduleName"; App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $log = $logService->fetchLogsByModule($moduleName); $message = $log->getMessageList(); foreach ($message as $messageList) { print_r("msg is : " . $messageList->getMessage()); print_r("module is : " . $messageList->getModule()); print_r("type is : " . $messageList->getType()); print_r("logTime is : " . $messageList->getLogTime()); } $jsonResponse = $log->toString();Coming SoonComing Soonvar moduleName:String = "moduleName"; App42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.fetchLogsByModule(moduleName,new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { var log:Log = Log(response); if(log.getMessageList().length > 0) { for(var i:int=0;i<log.getMessageList().length;i++) { trace("Log Time is : " + Message(log.getMessageList()[i]).getLogTime()); trace("Message is " + Message(log.getMessageList()[i]).getMessage()); trace("Module is " + Message(log.getMessageList()[i]).getModule()); trace("Get Type is " + Message(log.getMessageList()[i]).getType()); } } } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonString moduleName = "moduleName"; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogsByModule(moduleName); System.out.println("message is " + ((Message)log.getMessageList().elementAt(0)).getMessage()); System.out.println("module is " + ((Message)log.getMessageList().elementAt(0)).getModule()); String jsonResponse = log.toString();
Fetch the count of log messages based on the module.
Required Parameters
moduleName - Module name for which the count of messages have to be fetched.
String moduleName = "moduleName"; App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.fetchLogsCountByModule(moduleName, new App42CallBack() { public void onSuccess(Object response) { App42Response app42response = (App42Response)response; System.out.println("Total Records : " + app42response.getTotalRecords()); } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });String moduleName = "moduleName"; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsCountByModule(moduleName,new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { App42Response success = (App42Response) response; String jsonResponse = success.ToString(); } }NSString *moduleName = @"moduleName"; [App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService fetchLogsCountByModule:moduleName completionBlock:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { App42Response *response = (App42Response*)responseObj; NSString *success = response.isResponseSuccess; NSString *jsonResponse = [response toString]; } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];let moduleName = "moduleName" App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.fetchLogsCountByModule(moduleName, completionBlock: { (success, response, exception) -> Void in if (success) { let log = response as! App42Response NSLog("%@", log.strResponse) NSLog("%d", log.totalRecords) } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })String moduleName = "moduleName"; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); App42Response app42response = logService.fetchLogsCountByModule(moduleName); System.out.println("Total Records : " + app42response.getTotalRecords()); boolean success = app42response.isResponseSuccess(); String jsonResponse = app42response.toString();String moduleName = "moduleName"; App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsCountByModule(moduleName, new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Success : " + response); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }Coming SoonComing SoonComing SoonString moduleName = "moduleName"; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); App42Response response = logService.FetchLogsCountByModule(moduleName); Boolean success = response.IsResponseSuccess(); String jsonResponse = response.ToString();$moduleName = "moduleName"; App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $response = $logService->fetchLogsCountByModule($moduleName); print_r("Total Records : ".$response->getTotalRecords()); $success = $response->isResponseSuccess(); $jsonResponse = $response->toString();Coming SoonComing Soonvar moduleName:String = "moduleName"; App42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.fetchLogsCountByModule(moduleName,new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { var log:Log = Log(response); trace("Total Records :"+log.getTotalRecords()); } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonString moduleName = "moduleName"; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); App42Response response = logService.fetchLogsCountByModule(moduleName); boolean success = response.isResponseSuccess(); String jsonResponse = response.toString();
Fetch the log messages based on the module by paging.
Required Parameters
moduleName - Module name for which the messages have to be fetched.
max - Maximum number of records to be fetched.
offset - From where the records are to be fetched.
String moduleName = "moduleName"; int max = 1; int offset = 0; App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.fetchLogsByModule(moduleName, max, offset, new App42CallBack() { public void onSuccess(Object response) { Log log = (Log)response; ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });String moduleName = "moduleName"; int max = 1; int offset = 0; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByModule(moduleName,max,offset,new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { Console.WriteLine("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { Console.WriteLine(" jsonResponse is : " + log.GetMessageList()[i].ToString()); Console.WriteLine(" Message is : " + log.GetMessageList()[i].GetMessage()); Console.WriteLine(" Module is : " + log.GetMessageList()[i].GetModule()); Console.WriteLine(" Log Type is : " + log.GetMessageList()[i].GetType()); Console.WriteLine(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } String jsonResponse = log.ToString(); } }NSString *moduleName = @"moduleName"; int max = 1; int offset = 0; [App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService fetchLogsByModule:moduleName max:max offset:offset completionBlock:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { Log *response = (Log*)responseObj; NSLog(@"Response is %@" , response.strResponse); for (LogMessage *message in response.logMessageArray) { NSLog(@"module is =%@",message.module); NSLog(@"logTime is = %@",message.logTime); } } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];let moduleName = "moduleName" let max = 1 let offset = 0 App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.fetchLogsByModule(moduleName, max:max, offset:offset, completionBlock: { (success, response, exception) -> Void in if (success) { let log = response as! App42Response NSLog("%@", log.strResponse) for message in log.logMessageArray { NSLog("module is =%@",message.module); NSLog("logTime is = %@",message.logTime); } } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })String moduleName = "moduleName"; int max = 1; int offset = 0; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogsByModule(moduleName,max,offset); ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } String jsonResponse = log.toString();String moduleName = "moduleName"; int max = 1; int offset = 0; App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByModule(moduleName, max, offset, new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { App42Log.Console(" jsonResponse is : " + log.GetMessageList()[i].ToString()); App42Log.Console(" Message is : " + log.GetMessageList()[i].GetMessage()); App42Log.Console(" Module is : " + log.GetMessageList()[i].GetModule()); App42Log.Console(" Log Type is : " + log.GetMessageList()[i].GetType()); App42Log.Console(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } App42Log.Console("Success : " + log.ToString()); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }Not AvailableComing SoonComing SoonString moduleName = "moduleName"; int max = 1; int offset = 0; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); Log log = logService.FetchLogsByModule(moduleName,max,offset); Console.WriteLine("message is " + log.GetMessageList()[0].GetMessage()); Console.WriteLine("module is " + log.GetMessageList()[0].GetModule()); String jsonResponse = log.ToString();$moduleName = "moduleName"; $max = 1; $offset = 0; App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $log = $logService->fetchLogsByModule($moduleName,$max,$offset); $message = $log->getMessageList(); foreach ($message as $messageList) { print_r("msg is : " . $messageList->getMessage()); print_r("module is : " . $messageList->getModule()); print_r("type is : " . $messageList->getType()); print_r("logTime is : " . $messageList->getLogTime()); } $jsonResponse = $log->toString();Coming SoonComing Soonvar moduleName:String = "moduleName"; var max:int = 1; var offset:int = 0; App42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.fetchLogsByModuleByPaging(moduleName,max,offset,new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { var log:Log = Log(response); if(log.getMessageList().length > 0) { for(var i:int=0;i<log.getMessageList().length;i++) { trace("Log Time is : " + Message(log.getMessageList()[i]).getLogTime()); trace("Message is " + Message(log.getMessageList()[i]).getMessage()); trace("Module is " + Message(log.getMessageList()[i]).getModule()); trace("Get Type is " + Message(log.getMessageList()[i]).getType()); } } } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonString moduleName = "moduleName"; Integer max = new Integer(1); Integer offset = new Integer(0); App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogsByModule(moduleName,max,offset); System.out.println("message is " + ((Message)log.getMessageList().elementAt(0)).getMessage()); System.out.println("module is " + ((Message)log.getMessageList().elementAt(0)).getModule()); String jsonResponse = log.toString();
Fetch log messages based on the Module and Message Text.
Required Parameters
moduleName - Module name for which the messages have to be fetched.
text - The log message on which logs have to be searched.
String moduleName = "moduleName"; String text = "text"; App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.fetchLogsByModuleAndText(moduleName, text, new App42CallBack() { public void onSuccess(Object response) { Log log = (Log)response; ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });String moduleName = "moduleName"; String text = "text"; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByModuleAndText(moduleName,text,new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { Console.WriteLine("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { Console.WriteLine(" jsonResponse is : " + log.GetMessageList()[i].ToString()); Console.WriteLine(" Message is : " + log.GetMessageList()[i].GetMessage()); Console.WriteLine(" Module is : " + log.GetMessageList()[i].GetModule()); Console.WriteLine(" Log Type is : " + log.GetMessageList()[i].GetType()); Console.WriteLine(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } String jsonResponse = log.ToString(); } }NSString *moduleName = @"moduleName"; NSString *text = @"text"; [App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService fetchLogsByModuleAndText:moduleName text:text completionBlock:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { Log *response = (Log*)responseObj; NSLog(@"Response is %@" , response.strResponse); for (LogMessage *message in response.logMessageArray) { NSLog(@"module is =%@",message.module); NSLog(@"logTime is = %@",message.logTime); } } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];let moduleName = "moduleName" let text = "text" App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.fetchLogsByModuleAndText(moduleName, text:text, completionBlock: { (success, response, exception) -> Void in if (success) { let log = response as! Log NSLog("Response is %@", log.strResponse) for message in log.logMessageArray { NSLog("module is =%@",message.module); NSLog("logTime is = %@",message.logTime); } } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })String moduleName = "moduleName"; String text = "text"; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogsByModuleAndText(moduleName, text); ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } String jsonResponse = log.toString();String moduleName = "moduleName"; String text = "text"; App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByModuleAndText(moduleName, text, new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { App42Log.Console(" jsonResponse is : " + log.GetMessageList()[i].ToString()); App42Log.Console(" Message is : " + log.GetMessageList()[i].GetMessage()); App42Log.Console(" Module is : " + log.GetMessageList()[i].GetModule()); App42Log.Console(" Log Type is : " + log.GetMessageList()[i].GetType()); App42Log.Console(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } App42Log.Console("Success : " + log.ToString()); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }Not AvailableComing SoonComing SoonString moduleName = "moduleName"; String text = "text"; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); Log log = logService.FetchLogsByModuleAndText(moduleName,text); Console.WriteLine("message is " + log.GetMessageList()[0].GetMessage()); Console.WriteLine("module is " + log.GetMessageList()[0].GetModule()); String jsonResponse = log.ToString();$moduleName = "moduleName"; $text = "text"; App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $log = $logService->fetchLogsByModuleAndText($moduleName,$text); $message = $log->getMessageList(); foreach ($message as $messageList) { print_r("msg is : " . $messageList->getMessage()); print_r("module is : " . $messageList->getModule()); print_r("type is : " . $messageList->getType()); print_r("logTime is : " . $messageList->getLogTime()); } $jsonResponse = $log->toString();Coming SoonComing Soonvar moduleName:String = "moduleName"; var text:String = "text" App42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.fetchLogsByModuleAndText(moduleName, text,new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { var log:Log = Log(response); if(log.getMessageList().length > 0) { for(var i:int=0;i<log.getMessageList().length;i++) { trace("Log Time is : " + Message(log.getMessageList()[i]).getLogTime()); trace("Message is " + Message(log.getMessageList()[i]).getMessage()); trace("Module is " + Message(log.getMessageList()[i]).getModule()); trace("Get Type is " + Message(log.getMessageList()[i]).getType()); } } } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonString moduleName = "moduleName"; String text = "text"; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogsByModuleAndText(moduleName, text); System.out.println("message is " + ((Message)log.getMessageList().elementAt(0)).getMessage()); System.out.println("module is " + ((Message)log.getMessageList().elementAt(0)).getModule()); String jsonResponse = log.toString();
Fetch count of log messages based on the module and message text
Required Parameters
moduleName - Module name for which the count of messages has to be fetched.
text - Log message on which count of logs have to be searched.
String moduleName = "moduleName"; String text = "text"; App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.fetchLogsCountByModuleAndText(moduleName, text, new App42CallBack() { public void onSuccess(Object response) { App42Response app42response = (App42Response)response; System.out.println("Total Records : " + app42response.getTotalRecords()) ; } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });String moduleName = "moduleName"; String text = "text"; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsCountByModuleAndText(moduleName,text,new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { App42Response success = (App42Response) response; String jsonResponse = success.ToString(); } }NSString *moduleName = @"moduleName"; NSString *text = @"text"; [App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService fetchLogsCountByModuleAndText:moduleName text:text completionBlock:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { App42Response *response = (App42Response*)responseObj; NSString *success = response.isResponseSuccess; NSString *jsonResponse = [response toString]; } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];let moduleName = "moduleName" let text = "text" App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.fetchLogsCountByModuleAndText(moduleName, text:text, completionBlock: { (success, response, exception) -> Void in if (success) { let log = response as! Log NSLog("%@", log.strResponse) NSLog("%d", log.totalRecords) } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })String moduleName = "moduleName"; String text = "text"; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); App42Response app42response = logService.fetchLogsCountByModuleAndText(moduleName,text); System.out.println("Total Records : " + app42response.getTotalRecords()) ; boolean success = app42response.isResponseSuccess(); String jsonResponse = app42response.toString();String moduleName = "moduleName"; String text = "text"; App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsCountByModuleAndText(moduleName,text, new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Success : " + response); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }Coming SoonComing SoonComing SoonString moduleName = "moduleName"; String text = "text"; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); App42Response response = logService.FetchLogsCountByModuleAndText(moduleName,text); Boolean success = response.IsResponseSuccess(); String jsonResponse = response.ToString();$moduleName = "moduleName"; $text = "text"; App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $response = $logService->fetchLogsCountByModuleAndText($moduleName,$text); print_r("Total Records : ".$response->getTotalRecords()); $success = $response->isResponseSuccess(); $jsonResponse = $response->toString();Coming SoonComing Soonvar moduleName:String = "moduleName"; var text:String = "text" App42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.fetchLogsCountByModuleAndText(moduleName, text,new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { var log:Log = Log(response); trace("Total Records :"+log.getTotalRecords()); } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonString moduleName = "moduleName"; String text = "text"; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); App42Response response = logService.fetchLogsCountByModuleAndText(moduleName,text); boolean success = response.isResponseSuccess(); String jsonResponse = response.toString();
Fetch log messages based on the module and message text by paging.
Required Parameters
moduleName - Module name for which the messages have to be fetched.
text - The log message on which logs have to be searched.
max - Maximum number of records to be fetched.
offset - From where the records are to be fetched.
String moduleName = "moduleName"; String text = "text"; int max = 1; int offset = 0; App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.fetchLogsByModuleAndText(moduleName, text, max, offset,new App42CallBack() { public void onSuccess(Object response) { Log log = (Log)response; ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });String moduleName = "moduleName"; String text = "text"; int max = 1; int offset = 0; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByModuleAndText(moduleName,text,max,offset,new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { Console.WriteLine("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { Console.WriteLine(" jsonResponse is : " + log.GetMessageList()[i].ToString()); Console.WriteLine(" Message is : " + log.GetMessageList()[i].GetMessage()); Console.WriteLine(" Module is : " + log.GetMessageList()[i].GetModule()); Console.WriteLine(" Log Type is : " + log.GetMessageList()[i].GetType()); Console.WriteLine(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } String jsonResponse = log.ToString(); } }NSString *moduleName = @"moduleName"; NSString *text = @"text"; int max = 1; int offset = 0; [App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService fetchLogsByModuleAndText:moduleName text:text max:max offset:offset completionBlock:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { Log *response = (Log*)responseObj; NSLog(@"Response is %@" , response.strResponse); for (LogMessage *message in response.logMessageArray) { NSLog(@"module is =%@",message.module); NSLog(@"logTime is = %@",message.logTime); } } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];let moduleName = "moduleName" let text = "text" let max:Int32 = 1 let offset:Int32 = 0 App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.fetchLogsByModuleAndText(moduleName, text:text, max:max, offset:offset, completionBlock: { (success, response, exception) -> Void in if (success) { let log = response as! Log NSLog("%@", log.strResponse) for message in log.logMessageArray { NSLog("module is =%@",message.module) NSLog("logTime is = %@",message.logTime) } } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })String moduleName = "moduleName"; String text = "text"; int max = 1; int offset = 0; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogsByModuleAndText(moduleName,text,max,offset); ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } String jsonResponse = log.toString();String moduleName = "moduleName"; String text = "text"; int max = 1; int offset = 0; App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByModuleAndText(moduleName, text, max, offset, new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { App42Log.Console(" jsonResponse is : " + log.GetMessageList()[i].ToString()); App42Log.Console(" Message is : " + log.GetMessageList()[i].GetMessage()); App42Log.Console(" Module is : " + log.GetMessageList()[i].GetModule()); App42Log.Console(" Log Type is : " + log.GetMessageList()[i].GetType()); App42Log.Console(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } App42Log.Console("Success : " + log.ToString()); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }Not AvailableComing SoonComing SoonString moduleName = "moduleName"; String text = "text"; int max = 1; int offset = 0; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); Log log = logService.FetchLogsByModuleAndText(moduleName,text,max,offset); Console.WriteLine("message is " + log.GetMessageList()[0].GetMessage()); Console.WriteLine("module is " + log.GetMessageList()[0].GetModule()); String jsonResponse = log.ToString();$moduleName = "moduleName"; $text = "text"; $max = 1; $offset = 0; App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $log = $logService->fetchLogsByModuleAndText($moduleName,$text,$max,$offset); $message = $log->getMessageList(); foreach ($message as $messageList) { print_r("msg is : " . $messageList->getMessage()); print_r("module is : " . $messageList->getModule()); print_r("type is : " . $messageList->getType()); print_r("logTime is : " . $messageList->getLogTime()); } $jsonResponse = $log->toString();Coming SoonComing Soonvar moduleName:String = "moduleName"; var text:String = "text" var max:int = 1; var offset:int = 0; App42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.fetchLogsByModuleAndTextByPaging(moduleName, text, max, offset,new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { var log:Log = Log(response); if(log.getMessageList().length > 0) { for(var i:int=0;i<log.getMessageList().length;i++) { trace("Log Time is : " + Message(log.getMessageList()[i]).getLogTime()); trace("Message is " + Message(log.getMessageList()[i]).getMessage()); trace("Module is " + Message(log.getMessageList()[i]).getModule()); trace("Get Type is " + Message(log.getMessageList()[i]).getType()); } } } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonString moduleName = "moduleName"; String text = "text"; Integer max = new Integer(1); Integer offset = new Integer(0); App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogsByModuleAndText(moduleName,text,max,offset); System.out.println("message is " + ((Message)log.getMessageList().elementAt(0)).getMessage()); System.out.println("module is " + ((Message)log.getMessageList().elementAt(0)).getModule()); String jsonResponse = log.toString();
Fetch log messages based on info level.
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.fetchLogsByInfo(new App42CallBack() { public void onSuccess(Object response) { Log log = (Log)response; ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByInfo(new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { Console.WriteLine("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { Console.WriteLine(" jsonResponse is : " + log.GetMessageList()[i].ToString()); Console.WriteLine(" Message is : " + log.GetMessageList()[i].GetMessage()); Console.WriteLine(" Module is : " + log.GetMessageList()[i].GetModule()); Console.WriteLine(" Log Type is : " + log.GetMessageList()[i].GetType()); Console.WriteLine(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } String jsonResponse = log.ToString(); } }[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService fetchLogsByInfo:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { Log *response = (Log*)responseObj; NSLog(@"Response is %@" , response.strResponse); for (LogMessage *message in response.logMessageArray) { NSLog(@"module is =%@",message.module); NSLog(@"logTime is = %@",message.logTime); } } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.fetchLogsByInfo( { (success, response, exception) -> Void in if (success) { let log = response as! Log NSLog("%@", log.strResponse) for message in log.logMessageArray { NSLog("module is =%@",message.module) NSLog("logTime is = %@",message.logTime) } } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogsByInfo(); ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } String jsonResponse = log.toString();App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByInfo(new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { App42Log.Console(" jsonResponse is : " + log.GetMessageList()[i].ToString()); App42Log.Console(" Message is : " + log.GetMessageList()[i].GetMessage()); App42Log.Console(" Module is : " + log.GetMessageList()[i].GetModule()); App42Log.Console(" Log Type is : " + log.GetMessageList()[i].GetType()); App42Log.Console(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } App42Log.Console("Success : " + log.ToString()); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }Not AvailableComing SoonComing SoonApp42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); Log log = logService.FetchLogsByInfo(); Console.WriteLine("message is " + log.GetMessageList()[0].GetMessage()); Console.WriteLine("module is " + log.GetMessageList()[0].GetModule()); String jsonResponse = log.ToString();App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $log = $logService->fetchLogsByInfo(); $message = $log->getMessageList(); foreach ($message as $messageList) { print_r("msg is : " . $messageList->getMessage()); print_r("module is : " . $messageList->getModule()); print_r("type is : " . $messageList->getType()); print_r("logTime is : " . $messageList->getLogTime()); } $jsonResponse = $log->toString();Coming SoonComing SoonApp42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.fetchLogsByInfo(new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { var log:Log = Log(response); if(log.getMessageList().length > 0) { for(var i:int=0;i<log.getMessageList().length;i++) { trace("Log Time is : " + Message(log.getMessageList()[i]).getLogTime()); trace("Message is " + Message(log.getMessageList()[i]).getMessage()); trace("Module is " + Message(log.getMessageList()[i]).getModule()); trace("Get Type is " + Message(log.getMessageList()[i]).getType()); } } } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonApp42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogsByInfo(); System.out.println("message is " + ((Message)log.getMessageList().elementAt(0)).getMessage()); System.out.println("module is " + ((Message)log.getMessageList().elementAt(0)).getModule()); String jsonResponse = log.toString();
Fetch count of log messages based on info level.
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.fetchLogsCountByInfo(new App42CallBack() { public void onSuccess(Object response) { App42Response app42response = (App42Response)response; System.out.println("Total Records : " + app42response.getTotalRecords()) ; } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsCountByInfo(new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { App42Response success = (App42Response) response; String jsonResponse = success.ToString(); } }[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService fetchLogsCountByInfo:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { App42Response *response = (App42Response*)responseObj; NSString *success = response.isResponseSuccess; NSString *jsonResponse = [response toString]; } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? logService logService?.fetchLogsCountByInfo( { (success, response, exception) -> Void in if (success) { let log = response as! App42Response NSLog("%@", log.strResponse) NSLog("%d", log.totalRecords) } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); App42Response app42response = logService.fetchLogsCountByInfo(); System.out.println("Total Records : " + app42response.getTotalRecords()) ; boolean success = app42response.isResponseSuccess(); String jsonResponse = app42response.toString();App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsCountByInfo(new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Success : " + response); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }Coming SoonComing SoonComing SoonApp42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); App42Response response = logService.FetchLogsCountByInfo(); Boolean success = response.IsResponseSuccess(); String jsonResponse = response.ToString();App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $response = $logService->fetchLogsCountByInfo(); print_r("Total Records : ".$response->getTotalRecords()); $success = $response->isResponseSuccess(); $jsonResponse = $response->toString();Coming SoonComing SoonApp42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.fetchLogsCountByInfo(new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { var log:Log = Log(response); trace("Total Records :"+log.getTotalRecords()); } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonApp42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); App42Response response = logService.fetchLogsCountByInfo(); boolean success = response.isResponseSuccess(); String jsonResponse = response.toString();
Fetch log messages based on info level by paging.
Required Parameters
max - Maximum number of records to be fetched.
offset - From where the records are to be fetched.
int max = 1; int offset = 0; App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.fetchLogsByInfo(max, offset, new App42CallBack() { public void onSuccess(Object response) { Log log = (Log)response; ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });int max = 1; int offset = 0; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByInfo(max,offset,new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { Console.WriteLine("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { Console.WriteLine(" jsonResponse is : " + log.GetMessageList()[i].ToString()); Console.WriteLine(" Message is : " + log.GetMessageList()[i].GetMessage()); Console.WriteLine(" Module is : " + log.GetMessageList()[i].GetModule()); Console.WriteLine(" Log Type is : " + log.GetMessageList()[i].GetType()); Console.WriteLine(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } String jsonResponse = log.ToString(); } }int max = 1; int offset = 0; [App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService fetchLogsByInfo:max offset:offset completionBlock:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { Log *response = (Log*)responseObj; NSLog(@"Response is %@" , response.strResponse); for (LogMessage *message in response.logMessageArray) { NSLog(@"module is =%@",message.module); NSLog(@"logTime is = %@",message.logTime); } } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];let max:Int32 = 1 let offset:Int32 = 0 App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.fetchLogsByInfo(max, offset:offset, completionBlock: { (success, response, exception) -> Void in if (success) { let log = response as! Log NSLog("%@", log.strResponse) for message in log.logMessageArray { NSLog("module is =%@",message.module); NSLog("logTime is = %@",message.logTime); } } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })int max = 1; int offset = 0; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogsByInfo(max,offset); ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } String jsonResponse = log.toString();int max = 1; int offset = 0; App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByInfo(max, offset, new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { App42Log.Console(" jsonResponse is : " + log.GetMessageList()[i].ToString()); App42Log.Console(" Message is : " + log.GetMessageList()[i].GetMessage()); App42Log.Console(" Module is : " + log.GetMessageList()[i].GetModule()); App42Log.Console(" Log Type is : " + log.GetMessageList()[i].GetType()); App42Log.Console(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } App42Log.Console("Success : " + log.ToString()); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }Not AvailableComing SoonComing Soonint max = 1; int offset = 0; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); Log log = logService.FetchLogsByInfo(max,offset); Console.WriteLine("message is " + log.GetMessageList()[0].GetMessage()); Console.WriteLine("module is " + log.GetMessageList()[0].GetModule()); String jsonResponse = log.ToString();$max = 1; $offset = 0; App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $log = $logService->fetchLogsByInfo($max,$offset); $message = $log->getMessageList(); foreach ($message as $messageList) { print_r("msg is : " . $messageList->getMessage()); print_r("module is : " . $messageList->getModule()); print_r("type is : " . $messageList->getType()); print_r("logTime is : " . $messageList->getLogTime()); } $jsonResponse = $log->toString();Coming SoonComing Soonvar max:int = 1; var offset:int = 0; App42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.fetchLogsByInfoByPaging( max,offset,new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { var log:Log = Log(response); if(log.getMessageList().length > 0) { for(var i:int=0;i<log.getMessageList().length;i++) { trace("Log Time is : " + Message(log.getMessageList()[i]).getLogTime()); trace("Message is " + Message(log.getMessageList()[i]).getMessage()); trace("Module is " + Message(log.getMessageList()[i]).getModule()); trace("Get Type is " + Message(log.getMessageList()[i]).getType()); } } } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonInteger max = new Integer(1); Integer offset = new Integer(0); App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogsByInfo(max,offset); System.out.println("message is " + ((Message)log.getMessageList().elementAt(0)).getMessage()); System.out.println("module is " + ((Message)log.getMessageList().elementAt(0)).getModule()); String jsonResponse = log.toString();
Fetch log messages based on Debug Level.
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.fetchLogsByDebug(new App42CallBack() { public void onSuccess(Object response) { Log log = (Log)response; ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByDebug(new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { Console.WriteLine("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { Console.WriteLine(" jsonResponse is : " + log.GetMessageList()[i].ToString()); Console.WriteLine(" Message is : " + log.GetMessageList()[i].GetMessage()); Console.WriteLine(" Module is : " + log.GetMessageList()[i].GetModule()); Console.WriteLine(" Log Type is : " + log.GetMessageList()[i].GetType()); Console.WriteLine(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } String jsonResponse = log.ToString(); } }[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService fetchLogsByDebug:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { Log *response = (Log*)responseObj; NSLog(@"Response is %@" , response.strResponse); for (LogMessage *message in response.logMessageArray) { NSLog(@"module is =%@",message.module); NSLog(@"logTime is = %@",message.logTime); } } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.fetchLogsByDebug( { (success, response, exception) -> Void in if (success) { let log = response as! Log NSLog("%@", log.strResponse) for message in log.logMessageArray { NSLog("module is =%@",message.module); NSLog("logTime is = %@",message.logTime); } } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogsByDebug(); ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } String jsonResponse = log.toString();App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByDebug(new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { App42Log.Console(" jsonResponse is : " + log.GetMessageList()[i].ToString()); App42Log.Console(" Message is : " + log.GetMessageList()[i].GetMessage()); App42Log.Console(" Module is : " + log.GetMessageList()[i].GetModule()); App42Log.Console(" Log Type is : " + log.GetMessageList()[i].GetType()); App42Log.Console(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } App42Log.Console("Success : " + log.ToString()); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }Not AvailableComing SoonComing SoonApp42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); Log log = logService.FetchLogsByDebug(); Console.WriteLine("message is " + log.GetMessageList()[0].GetMessage()); Console.WriteLine("module is " + log.GetMessageList()[0].GetModule()); String jsonResponse = log.ToString();App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $log = $logService->fetchLogsByDebug(); $message = $log->getMessageList(); foreach ($message as $messageList) { print_r("msg is : " . $messageList->getMessage()); print_r("module is : " . $messageList->getModule()); print_r("type is : " . $messageList->getType()); print_r("logTime is : " . $messageList->getLogTime()); } $jsonResponse = $log->toString();Coming SoonComing SoonApp42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.fetchLogsByDebug(new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { var log:Log = Log(response); if(log.getMessageList().length > 0) { for(var i:int=0;i<log.getMessageList().length;i++) { trace("Log Time is : " + Message(log.getMessageList()[i]).getLogTime()); trace("Message is " + Message(log.getMessageList()[i]).getMessage()); trace("Module is " + Message(log.getMessageList()[i]).getModule()); trace("Get Type is " + Message(log.getMessageList()[i]).getType()); } } } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonApp42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogsByDebug(); System.out.println("message is " + ((Message)log.getMessageList().elementAt(0)).getMessage()); System.out.println("module is " + ((Message)log.getMessageList().elementAt(0)).getModule()); String jsonResponse = log.toString();
Fetch count of log messages based on debug level.
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.fetchLogsCountByDebug(new App42CallBack() { public void onSuccess(Object response) { App42Response app42response = (App42Response)response; System.out.println("Total Records : " + app42response.getTotalRecords()) ; } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsCountByDebug(new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { App42Response success = (App42Response) response; String jsonResponse = success.ToString(); } }[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService fetchLogsCountByDebug:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { App42Response *response = (App42Response*)responseObj; NSString *success = response.isResponseSuccess; NSString *jsonResponse = [response toString]; } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.fetchLogsCountByDebug( { (success, response, exception) -> Void in if (success) { let log = response as! Log NSLog("%@", log.strResponse) NSLog("%d", log.totalRecords) } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); App42Response app42response = logService.fetchLogsCountByDebug(); System.out.println("Total Records : " + app42response.getTotalRecords()) ; boolean success = app42response.isResponseSuccess(); String jsonResponse = app42response.toString();App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsCountByDebug(new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Success : " + response); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }Coming SoonComing SoonComing SoonApp42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); App42Response response = logService.FetchLogsCountByDebug(); Boolean success = response.IsResponseSuccess(); String jsonResponse = response.ToString();App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $response = $logService->fetchLogsCountByDebug(); print_r("Total Records : ".$response->getTotalRecords()); $success = $response->isResponseSuccess(); $jsonResponse = $response->toString();Coming SoonComing SoonApp42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.fetchLogsCountByDebug(new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { var log:Log = Log(response); trace("Total Records :"+log.getTotalRecords()); } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonApp42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); App42Response response = logService.fetchLogsCountByDebug(); boolean success = response.isResponseSuccess(); String jsonResponse = response.toString();
Fetch log messages based on debug level by paging.
Required Parameters
max - Maximum number of records to be fetched.
offset - From where the records are to be fetched.
int max = 1; int offset = 0; App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.fetchLogsByDebug(max, offset, new App42CallBack() { public void onSuccess(Object response) { Log log = (Log)response; ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });int max = 1; int offset = 0; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByDebug(max,offset,new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { Console.WriteLine("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { Console.WriteLine(" jsonResponse is : " + log.GetMessageList()[i].ToString()); Console.WriteLine(" Message is : " + log.GetMessageList()[i].GetMessage()); Console.WriteLine(" Module is : " + log.GetMessageList()[i].GetModule()); Console.WriteLine(" Log Type is : " + log.GetMessageList()[i].GetType()); Console.WriteLine(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } String jsonResponse = log.ToString(); } }int max = 1; int offset = 0; [App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService fetchLogsByDebug:max offset:offset completionBlock:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { Log *response = (Log*)responseObj; NSLog(@"Response is %@" , response.strResponse); for (LogMessage *message in response.logMessageArray) { NSLog(@"module is =%@",message.module); NSLog(@"logTime is = %@",message.logTime); } } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];let max:Int32 = 1 let offset:Int32 = 0 App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.fetchLogsByDebug(max, offset:offset, completionBlock: { (success, response, exception) -> Void in if (success) { let log = response as! Log NSLog("%@", log.strResponse) for message in log.logMessageArray { NSLog("module is =%@",message.module); NSLog("logTime is = %@",message.logTime); } } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })int max = 1; int offset = 0; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogsByDebug(max,offset); ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } String jsonResponse = log.toString();int max = 1; int offset = 0; App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByDebug(max, offset, new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { App42Log.Console(" jsonResponse is : " + log.GetMessageList()[i].ToString()); App42Log.Console(" Message is : " + log.GetMessageList()[i].GetMessage()); App42Log.Console(" Module is : " + log.GetMessageList()[i].GetModule()); App42Log.Console(" Log Type is : " + log.GetMessageList()[i].GetType()); App42Log.Console(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } App42Log.Console("Success : " + log.ToString()); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }Not AvailableComing SoonComing Soonint max = 1; int offset = 0; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); Log log = logService.FetchLogsByDebug(max,offset); Console.WriteLine("message is " + log.GetMessageList()[0].GetMessage()); Console.WriteLine("module is " + log.GetMessageList()[0].GetModule()); String jsonResponse = log.ToString();$max = 1; $offset = 0; App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $log = $logService->fetchLogsByDebug($max,$offset); $message = $log->getMessageList(); foreach ($message as $messageList) { print_r("msg is : " . $messageList->getMessage()); print_r("module is : " . $messageList->getModule()); print_r("type is : " . $messageList->getType()); print_r("logTime is : " . $messageList->getLogTime()); } $jsonResponse = $log->toString();Coming SoonComing Soonvar max:int = 1; var offset:int = 0; App42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.fetchLogsByDebugByPaging(max,offset,new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { var log:Log = Log(response); if(log.getMessageList().length > 0) { for(var i:int=0;i<log.getMessageList().length;i++) { trace("Log Time is : " + Message(log.getMessageList()[i]).getLogTime()); trace("Message is " + Message(log.getMessageList()[i]).getMessage()); trace("Module is " + Message(log.getMessageList()[i]).getModule()); trace("Get Type is " + Message(log.getMessageList()[i]).getType()); } } } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonInteger max = new Integer(1); Integer offset = new Integer(0); App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogsByDebug(max,offset); System.out.println("message is " + ((Message)log.getMessageList().elementAt(0)).getMessage()); System.out.println("module is " + ((Message)log.getMessageList().elementAt(0)).getModule()); String jsonResponse = log.toString();
Fetch log messages based on error level.
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.fetchLogsByError(new App42CallBack() { public void onSuccess(Object response) { Log log = (Log)response; ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByError(new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { Console.WriteLine("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { Console.WriteLine(" jsonResponse is : " + log.GetMessageList()[i].ToString()); Console.WriteLine(" Message is : " + log.GetMessageList()[i].GetMessage()); Console.WriteLine(" Module is : " + log.GetMessageList()[i].GetModule()); Console.WriteLine(" Log Type is : " + log.GetMessageList()[i].GetType()); Console.WriteLine(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } String jsonResponse = log.ToString(); } }[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService fetchLogsByError:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { Log *response = (Log*)responseObj; NSLog(@"Response is %@" , response.strResponse); for (LogMessage *message in response.logMessageArray) { NSLog(@"module is =%@",message.module); NSLog(@"logTime is = %@",message.logTime); } } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.fetchLogsByError( { (success, response, exception) -> Void in if (success) { let log = response as! Log NSLog("%@", log.strResponse) for message in log.logMessageArray { NSLog("module is =%@",message.module); NSLog("logTime is = %@",message.logTime); } } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogsByError(); ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } String jsonResponse = log.toString();App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByError( new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { App42Log.Console(" jsonResponse is : " + log.GetMessageList()[i].ToString()); App42Log.Console(" Message is : " + log.GetMessageList()[i].GetMessage()); App42Log.Console(" Module is : " + log.GetMessageList()[i].GetModule()); App42Log.Console(" Log Type is : " + log.GetMessageList()[i].GetType()); App42Log.Console(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } App42Log.Console("Success : " + log.ToString()); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }Not AvailableComing SoonComing SoonApp42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); Log log = logService.FetchLogsByError(); Console.WriteLine("message is " + log.GetMessageList()[0].GetMessage()); Console.WriteLine("module is " + log.GetMessageList()[0].GetModule()); String jsonResponse = log.ToString();App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $log = $logService->fetchLogsByError(); $message = $log->getMessageList(); foreach ($message as $messageList) { print_r("msg is : " . $messageList->getMessage()); print_r("module is : " . $messageList->getModule()); print_r("type is : " . $messageList->getType()); print_r("logTime is : " . $messageList->getLogTime()); } $jsonResponse = $log->toString();Coming SoonComing SoonApp42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.fetchLogsByError(new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { var log:Log = Log(response); if(log.getMessageList().length > 0) { for(var i:int=0;i<log.getMessageList().length;i++) { trace("Log Time is : " + Message(log.getMessageList()[i]).getLogTime()); trace("Message is " + Message(log.getMessageList()[i]).getMessage()); trace("Module is " + Message(log.getMessageList()[i]).getModule()); trace("Get Type is " + Message(log.getMessageList()[i]).getType()); } } } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonApp42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogsByError(); System.out.println("message is " + ((Message)log.getMessageList().elementAt(0)).getMessage()); System.out.println("module is " + ((Message)log.getMessageList().elementAt(0)).getModule()); String jsonResponse = log.toString();
Fetch count of log messages based on error level.
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.fetchLogsCountByError(new App42CallBack() { public void onSuccess(Object response) { App42Response app42response = (App42Response)response; System.out.println("Total Records : " + app42response.getTotalRecords()) ; } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsCountByError(new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { App42Response success = (App42Response) response; String jsonResponse = success.ToString(); } }[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService fetchLogsCountByError:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { App42Response *response = (App42Response*)responseObj; NSString *success = response.isResponseSuccess; NSString *jsonResponse = [response toString]; } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.fetchLogsCountByError( { (success, response, exception) -> Void in if (success) { let log = response as! Log NSLog("%@", log.strResponse) NSLog("%d", log.totalRecords) } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); App42Response app42response = logService.fetchLogsCountByError(); System.out.println("Total Records : " + app42response.getTotalRecords()) ; boolean success = app42response.isResponseSuccess(); String jsonResponse = app42response.toString();App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsCountByError(new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Success : " + response); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }Coming SoonComing SoonComing SoonApp42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); App42Response response = logService.FetchLogsCountByError(); Boolean success = response.IsResponseSuccess(); String jsonResponse = response.ToString();App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $response = $logService->fetchLogsCountByError(); print_r("Total Records : ".$response->getTotalRecords()); $success = $response->isResponseSuccess(); $jsonResponse = $response->toString();Coming SoonComing SoonApp42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.fetchLogsCountByError(new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { var log:Log = Log(response); trace("Total Records :"+log.getTotalRecords()); } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonApp42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); App42Response response = logService.fetchLogsCountByError(); boolean success = response.isResponseSuccess(); String jsonResponse = response.toString();
Fetch log messages based on error level by paging.
Required Parameters
max - Maximum number of records to be fetched.
offset - From where the records are to be fetched.
int max = 1; int offset = 0; App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.fetchLogsByError(max, offset, new App42CallBack() { public void onSuccess(Object response) { Log log = (Log)response; ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });int max = 1; int offset = 0; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByError(max,offset,new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { Console.WriteLine("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { Console.WriteLine(" jsonResponse is : " + log.GetMessageList()[i].ToString()); Console.WriteLine(" Message is : " + log.GetMessageList()[i].GetMessage()); Console.WriteLine(" Module is : " + log.GetMessageList()[i].GetModule()); Console.WriteLine(" Log Type is : " + log.GetMessageList()[i].GetType()); Console.WriteLine(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } String jsonResponse = log.ToString(); } }int max = 1; int offset = 0; [App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService fetchLogsByError:max offset:offset completionBlock:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { Log *response = (Log*)responseObj; NSLog(@"Response is %@" , response.strResponse); for (LogMessage *message in response.logMessageArray) { NSLog(@"module is =%@",message.module); NSLog(@"logTime is = %@",message.logTime); } } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];let max:Int32 = 1 let offset:Int32 = 0 App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.fetchLogsByError(max, offset:offset, completionBlock: { (success, response, exception) -> Void in if (success) { let log = response as! Log NSLog("%@", log.strResponse) for message in log.logMessageArray { NSLog("module is =%@",message.module); NSLog("logTime is = %@",message.logTime); } } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })int max = 1; int offset = 0; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogsByError(max,offset); ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } String jsonResponse = log.toString();int max = 1; int offset = 0; App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByError(max, offset, new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { App42Log.Console(" jsonResponse is : " + log.GetMessageList()[i].ToString()); App42Log.Console(" Message is : " + log.GetMessageList()[i].GetMessage()); App42Log.Console(" Module is : " + log.GetMessageList()[i].GetModule()); App42Log.Console(" Log Type is : " + log.GetMessageList()[i].GetType()); App42Log.Console(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } App42Log.Console("Success : " + log.ToString()); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }Not AvailableComing SoonComing Soonint max = 1; int offset = 0; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); Log log = logService.FetchLogsByError(max,offset); Console.WriteLine("message is " + log.GetMessageList()[0].GetMessage()); Console.WriteLine("module is " + log.GetMessageList()[0].GetModule()); String jsonResponse = log.ToString();$max = 1; $offset = 0; App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $log = $logService->fetchLogsByError($max,$offset); $message = $log->getMessageList(); foreach ($message as $messageList) { print_r("msg is : " . $messageList->getMessage()); print_r("module is : " . $messageList->getModule()); print_r("type is : " . $messageList->getType()); print_r("logTime is : " . $messageList->getLogTime()); } $jsonResponse = $log->toString();Coming SoonComing Soonvar max:int = 1; var offset:int = 0; App42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.fetchLogsByErrorByPaging( max, offset,new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { var log:Log = Log(response); if(log.getMessageList().length > 0) { for(var i:int=0;i<log.getMessageList().length;i++) { trace("Log Time is : " + Message(log.getMessageList()[i]).getLogTime()); trace("Message is " + Message(log.getMessageList()[i]).getMessage()); trace("Module is " + Message(log.getMessageList()[i]).getModule()); trace("Get Type is " + Message(log.getMessageList()[i]).getType()); } } } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonInteger max = new Integer(1); Integer offset = new Integer(0); App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogsByError(max,offset); System.out.println("message is " + ((Message)log.getMessageList().elementAt(0)).getMessage()); System.out.println("module is " + ((Message)log.getMessageList().elementAt(0)).getModule()); String jsonResponse = log.toString();
Fetch log messages based on fatal Level.
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.fetchLogsByFatal(new App42CallBack() { public void onSuccess(Object response) { Log log = (Log)response; ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByFatal(new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { Console.WriteLine("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { Console.WriteLine(" jsonResponse is : " + log.GetMessageList()[i].ToString()); Console.WriteLine(" Message is : " + log.GetMessageList()[i].GetMessage()); Console.WriteLine(" Module is : " + log.GetMessageList()[i].GetModule()); Console.WriteLine(" Log Type is : " + log.GetMessageList()[i].GetType()); Console.WriteLine(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } String jsonResponse = log.ToString(); } }[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService fetchLogsByFatal:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { Log *response = (Log*)responseObj; NSLog(@"Response is %@" , response.strResponse); for (LogMessage *message in response.logMessageArray) { NSLog(@"module is =%@",message.module); NSLog(@"logTime is = %@",message.logTime); } } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.fetchLogsByFatal( { (success, response, exception) -> Void in if (success) { let log = response as! Log NSLog("%@", log.strResponse) for message in log.logMessageArray { NSLog("module is =%@",message.module); NSLog("logTime is = %@",message.logTime); } } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogsByFatal(); ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } String jsonResponse = log.toString();App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByFatal(new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { App42Log.Console(" jsonResponse is : " + log.GetMessageList()[i].ToString()); App42Log.Console(" Message is : " + log.GetMessageList()[i].GetMessage()); App42Log.Console(" Module is : " + log.GetMessageList()[i].GetModule()); App42Log.Console(" Log Type is : " + log.GetMessageList()[i].GetType()); App42Log.Console(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } App42Log.Console("Success : " + log.ToString()); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }Not AvailableComing SoonComing SoonApp42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); Log log = logService.FetchLogsByFatal(); Console.WriteLine("message is " + log.GetMessageList()[0].GetMessage()); Console.WriteLine("module is " + log.GetMessageList()[0].GetModule()); String jsonResponse = log.ToString();App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $log = $logService->fetchLogsByFatal(); $message = $log->getMessageList(); foreach ($message as $messageList) { print_r("msg is : " . $messageList->getMessage()); print_r("module is : " . $messageList->getModule()); print_r("type is : " . $messageList->getType()); print_r("logTime is : " . $messageList->getLogTime()); } $jsonResponse = $log->toString();Coming SoonComing SoonApp42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.fetchLogsByFatal(new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { var log:Log = Log(response); if(log.getMessageList().length > 0) { for(var i:int=0;i<log.getMessageList().length;i++) { trace("Log Time is : " + Message(log.getMessageList()[i]).getLogTime()); trace("Message is " + Message(log.getMessageList()[i]).getMessage()); trace("Module is " + Message(log.getMessageList()[i]).getModule()); trace("Get Type is " + Message(log.getMessageList()[i]).getType()); } } } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonApp42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogsByFatal(); System.out.println("message is " + ((Message)log.getMessageList().elementAt(0)).getMessage()); System.out.println("module is " + ((Message)log.getMessageList().elementAt(0)).getModule()); String jsonResponse = log.toString();
Fetch count of log messages based on fatal level.
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.fetchLogsCountByFatal(new App42CallBack() { public void onSuccess(Object response) { App42Response app42response = (App42Response)response; System.out.println("Total Records : " + app42response.getTotalRecords()); } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsCountByFatal(new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { App42Response success = (App42Response) response; String jsonResponse = success.ToString(); } }[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService fetchLogsCountByFatal:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { App42Response *response = (App42Response*)responseObj; NSString *success = response.isResponseSuccess; NSString *jsonResponse = [response toString]; } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.fetchLogsCountByFatal( { (success, response, exception) -> Void in if (success) { let log = response as! Log NSLog("%@", log.strResponse) NSLog("%d", log.totalRecords) } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); App42Response app42response = logService.fetchLogsCountByFatal(); System.out.println("Total Records : " + app42response.getTotalRecords()) ; boolean success = app42response.isResponseSuccess(); String jsonResponse = app42response.toString();App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsCountByFatal(new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Success : " + response); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }Coming SoonComing SoonComing SoonApp42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); App42Response response = logService.FetchLogsCountByFatal(); Boolean success = response.IsResponseSuccess(); String jsonResponse = response.ToString();App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $response = $logService->fetchLogsCountByFatal(); print_r("Total Records : ".$response->getTotalRecords()); $success = $response->isResponseSuccess(); $jsonResponse = $response->toString();Coming SoonComing SoonApp42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.fetchLogsCountByFatal(new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { var log:Log = Log(response); trace("Total Records :"+log.getTotalRecords()); } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonApp42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); App42Response response = logService.fetchLogsCountByFatal(); boolean success = response.isResponseSuccess(); String jsonResponse = response.toString();
Fetch log messages based on fatal level by paging.
Required Parameters
max - Maximum number of records to be fetched.
offset - From where the records are to be fetched.
int max = 1; int offset = 0; App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.fetchLogsByFatal(max, offset,new App42CallBack() { public void onSuccess(Object response) { Log log = (Log)response; ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });int max = 1; int offset = 0; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByFatal(max, offset, new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { Console.WriteLine("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { Console.WriteLine(" jsonResponse is : " + log.GetMessageList()[i].ToString()); Console.WriteLine(" Message is : " + log.GetMessageList()[i].GetMessage()); Console.WriteLine(" Module is : " + log.GetMessageList()[i].GetModule()); Console.WriteLine(" Log Type is : " + log.GetMessageList()[i].GetType()); Console.WriteLine(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } String jsonResponse = log.ToString(); } }int max = 1; int offset = 0; [App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService fetchLogsByFatal:max offset:offset completionBlock:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { Log *response = (Log*)responseObj; NSLog(@"Response is %@" , response.strResponse); for (LogMessage *message in response.logMessageArray) { NSLog(@"module is =%@",message.module); NSLog(@"logTime is = %@",message.logTime); } } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];let max = 1; let offset = 0; App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.fetchLogsByFatal(max, offset:offset, completionBlock: { (success, response, exception) -> Void in if (success) { let log = response as! Log NSLog("%@", log.strResponse) for message in log.logMessageArray { NSLog("module is =%@",message.module); NSLog("logTime is = %@",message.logTime); } } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })int max = 1; int offset = 0; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogsByFatal(max,offset); ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } String jsonResponse = log.toString();int max = 1; int offset = 0; App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByFatal(max, offset, new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { App42Log.Console(" jsonResponse is : " + log.GetMessageList()[i].ToString()); App42Log.Console(" Message is : " + log.GetMessageList()[i].GetMessage()); App42Log.Console(" Module is : " + log.GetMessageList()[i].GetModule()); App42Log.Console(" Log Type is : " + log.GetMessageList()[i].GetType()); App42Log.Console(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } App42Log.Console("Success : " + log.ToString()); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }Not AvailableComing SoonComing Soonint max = 1; int offset = 0; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); Log log = logService.FetchLogsByFatal(max,offset); Console.WriteLine("message is " + log.GetMessageList()[0].GetMessage()); Console.WriteLine("module is " + log.GetMessageList()[0].GetModule()); String jsonResponse = log.ToString();$max = 1; $offset = 0; App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $log = $logService->fetchLogsByFatal($max,$offset); $message = $log->getMessageList(); foreach ($message as $messageList) { print_r("msg is : " . $messageList->getMessage()); print_r("module is : " . $messageList->getModule()); print_r("type is : " . $messageList->getType()); print_r("logTime is : " . $messageList->getLogTime()); } $jsonResponse = $log->toString();Coming SoonComing Soonvar max:int = 1; var offset:int = 0; App42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.fetchLogsByFatalByPaging(max,offset,new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { var log:Log = Log(response); if(log.getMessageList().length > 0) { for(var i:int=0;i<log.getMessageList().length;i++) { trace("Log Time is : " + Message(log.getMessageList()[i]).getLogTime()); trace("Message is " + Message(log.getMessageList()[i]).getMessage()); trace("Module is " + Message(log.getMessageList()[i]).getModule()); trace("Get Type is " + Message(log.getMessageList()[i]).getType()); } } } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonInteger max = new Integer(1); Integer offset = new Integer(0); App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogsByFatal(max,offset); System.out.println("message is " + ((Message)log.getMessageList().elementAt(0)).getMessage()); System.out.println("module is " + ((Message)log.getMessageList().elementAt(0)).getModule()); String jsonResponse = log.toString();
Fetch log messages based on date range.
Required Parameters
startDate - Start date from which the log messages have to be fetched.
endDate - End date up to which the log messages have to be fetched.
Date startDate = new Date(new Date().getTime() - 60 * 60 * 1000) ; Date endDate = new Date(new Date().getTime()) ; App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.fetchLogByDateRange(startDate, endDate,new App42CallBack() { public void onSuccess(Object response) { Log log = (Log)response; ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });DateTime startDate = DateTime.Today; DateTime endDate = DateTime.Now; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogByDateRange(startDate, endDate,new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { Console.WriteLine("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { Console.WriteLine(" jsonResponse is : " + log.GetMessageList()[i].ToString()); Console.WriteLine(" Message is : " + log.GetMessageList()[i].GetMessage()); Console.WriteLine(" Module is : " + log.GetMessageList()[i].GetModule()); Console.WriteLine(" Log Type is : " + log.GetMessageList()[i].GetType()); Console.WriteLine(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } String jsonResponse = log.ToString(); } }NSCalendar *calendar = [NSCalendar currentCalendar]; NSDateComponents *components = [calendar components:(NSDayCalendarUnit | NSMonthCalendarUnit | NSYearCalendarUnit | NSWeekCalendarUnit) fromDate:[NSDate date]]; NSDateComponents *yesterdayComponents = [components copy]; [yesterdayComponents setDay:[yesterdayComponents day]-1]; NSDate *startDate = [calendar dateFromComponents:yesterdayComponents]; NSDate *endDate = [NSDate date] ; [App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService fetchLogByDateRange:startDate endDate:endDate completionBlock:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { Log *response = (Log*)responseObj; NSLog(@"Response is %@" , response.strResponse); for (LogMessage *message in response.logMessageArray) { NSLog(@"module is =%@",message.module); NSLog(@"logTime is = %@",message.logTime); } } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];let startDate = NSDate(timeIntervalSinceNow: -24*60*60) //change this as required let endDate = NSDate() App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.fetchLogByDateRange(startDate, endDate:endDate, completionBlock: { (success, response, exception) -> Void in if (success) { let log = response as! Log NSLog("%@", log.strResponse) NSLog("%d", log.totalRecords) } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })Date startDate = new Date(new Date().getTime() - 60 * 60 * 1000) ; Date endDate = new Date(new Date().getTime()) ; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogByDateRange(startDate, endDate); ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } String jsonResponse = log.toString();DateTime startDate = DateTime.Today; DateTime endDate = DateTime.Now; App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogByDateRange(startDate, endDate, new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { App42Log.Console(" jsonResponse is : " + log.GetMessageList()[i].ToString()); App42Log.Console(" Message is : " + log.GetMessageList()[i].GetMessage()); App42Log.Console(" Module is : " + log.GetMessageList()[i].GetModule()); App42Log.Console(" Log Type is : " + log.GetMessageList()[i].GetType()); App42Log.Console(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } App42Log.Console("Success : " + log.ToString()); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }Not AvailableComing SoonComing SoonDateTime startDate = DateTime.Today; DateTime endDate = DateTime.Now; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); Log log = logService.FetchLogByDateRange(startDate, endDate); Console.WriteLine("message is " + log.GetMessageList()[0].GetMessage()); Console.WriteLine("module is " + log.GetMessageList()[0].GetModule()); String jsonResponse = log.ToString();$date = date(DATE_ATOM, mktime()); $date2 = strtotime($date); $newdate = strtotime('-2 day', strtotime($date)); $startDate = date('Y-m-j', $newdate); $endDate = date('Y-m-j', $date2); App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $log = $logService->fetchLogByDateRange($startDate, $endDate); $message = $log->getMessageList(); foreach ($message as $messageList) { print_r("msg is : " . $messageList->getMessage()); print_r("module is : " . $messageList->getModule()); print_r("type is : " . $messageList->getType()); print_r("logTime is : " . $messageList->getLogTime()); } $jsonResponse = $log->toString();Coming SoonComing Soonvar startDate:Date = new Date(new Date().getTime() - 1000 * 60 * 60 * 24* 20); var endDate:Date = new Date(new Date().getTime() + 100 * 60 * 60 * 24 * 10); App42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.fetchLogByDateRange(startDate,endDate,new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { var log:Log = Log(response); if(log.getMessageList().length > 0) { for(var i:int=0;i<log.getMessageList().length;i++) { trace("Log Time is : " + Message(log.getMessageList()[i]).getLogTime()); trace("Message is " + Message(log.getMessageList()[i]).getMessage()); trace("Module is " + Message(log.getMessageList()[i]).getModule()); trace("Get Type is " + Message(log.getMessageList()[i]).getType()); } } } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonDate startDate = new Date(new Date().getTime() - 60 * 60 * 1000) ; Date endDate = new Date(new Date().getTime()) ; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogByDateRange(startDate, endDate); System.out.println("message is " + log.getMessageList().get(0).getMessage()); System.out.println("module is " + log.getMessageList().get(0).getModule()); String jsonResponse = log.toString();
Fetch count of log messages based on date range.
Required Parameters
startDate - Start date from which count of log messages has to be fetched.
endDate - End date up to which count of log messages has to be fetched.
Date startDate = new Date(new Date().getTime() - 60 * 60 * 1000) ; Date endDate = new Date(new Date().getTime()) ; App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.fetchLogCountByDateRange(startDate, endDate,new App42CallBack() { public void onSuccess(Object response) { App42Response app42response = (App42Response)response; System.out.println("Total Records : " + app42response.getTotalRecords()); } public void onException(Exception ex) { System.out.println("Exception Message : " + ex.getMessage()); } });DateTime startDate = DateTime.Today; DateTime endDate = DateTime.Now; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogCountByDateRange(startDate,endDate,new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { App42Response success = (App42Response) response; String jsonResponse = success.ToString(); } }NSCalendar *calendar = [NSCalendar currentCalendar]; NSDateComponents *components = [calendar components:(NSDayCalendarUnit | NSMonthCalendarUnit | NSYearCalendarUnit | NSWeekCalendarUnit) fromDate:[NSDate date]]; NSDateComponents *yesterdayComponents = [components copy]; [yesterdayComponents setDay:[yesterdayComponents day]-1]; NSDate *startDate = [calendar dateFromComponents:yesterdayComponents]; NSDate *endDate = [NSDate date] ; [App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService fetchLogCountByDateRange:startDate endDate:endDate completionBlock:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { App42Response *response = (App42Response*)responseObj; NSString *success = response.isResponseSuccess; NSString *jsonResponse = [response toString]; } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];let startDate = NSDate(timeIntervalSinceNow: -24*60*60) //change this as required let endDate = NSDate() App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.fetchLogCountByDateRange(startDate, endDate:endDate, completionBlock: { (success, response, exception) -> Void in if (success) { let log = response as! Log NSLog("%@", log.strResponse) NSLog("%d", log.totalRecords) } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })Date startDate = new Date(new Date().getTime() - 60 * 60 * 1000) ; Date endDate = new Date(new Date().getTime()) ; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); App42Response app42response = logService.fetchLogCountByDateRange(startDate,endDate); System.out.println("Total Records : " + app42response.getTotalRecords()); boolean success = app42response.isResponseSuccess(); String jsonResponse = app42response.toString();DateTime startDate = DateTime.Today; DateTime endDate = DateTime.Now; App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogCountByDateRange(startDate,endDate, new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Success : " + response); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }Coming SoonComing SoonComing SoonDateTime startDate = DateTime.Today; DateTime endDate = DateTime.Now; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); App42Response response = logService.FetchLogCountByDateRange(startDate,endDate); Boolean success = response.IsResponseSuccess(); String jsonResponse = response.ToString();$date = date(DATE_ATOM, mktime()); $date2 = strtotime($date); $newdate = strtotime('-2 day', strtotime($date)); $startDate = date('Y-m-j', $newdate); $endDate = date('Y-m-j', $date2); App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $response = $logService->fetchLogCountByDateRange($startDate,$endDate); print_r("Total Records : ".$response->getTotalRecords()); $success = $response->isResponseSuccess(); $jsonResponse = $response->toString();Coming SoonComing Soonvar startDate:Date = new Date(new Date().getTime() - 1000 * 60 * 60 * 24* 20); var endDate:Date = new Date(new Date().getTime() + 100 * 60 * 60 * 24 * 10); App42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.fetchLogCountByDateRange(startDate,endDate,new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { var log:Log = Log(response); trace("Total Records :"+log.getTotalRecords()); } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonDate startDate = new Date(new Date().getTime() - 60 * 60 * 1000) ; Date endDate = new Date(new Date().getTime()) ; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); App42Response response = logService.fetchLogCountByDateRange(startDate,endDate); boolean success = response.isResponseSuccess(); String jsonResponse = response.toString();
Fetch log messages based on date range by paging.
Required Parameters
startDate - Start date from which the log messages have to be fetched.
endDate - End date up to which the log messages have to be fetched.
max - Maximum number of records to be fetched.
offset - From where the records are to be fetched.
Date startDate = new Date(new Date().getTime() - 60 * 60 * 1000) ; Date endDate = new Date(new Date().getTime()) ; int max = 1; int offset = 0; App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.fetchLogByDateRange(startDate, endDate, max, offset,new App42CallBack() { public void onSuccess(Object response) { Log log = (Log)response; ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });DateTime startDate = DateTime.Today; DateTime endDate = DateTime.Now; int max = 1; int offset = 0; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogByDateRange(startDate, endDate, max, offset, new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { Console.WriteLine("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { Console.WriteLine(" jsonResponse is : " + log.GetMessageList()[i].ToString()); Console.WriteLine(" Message is : " + log.GetMessageList()[i].GetMessage()); Console.WriteLine(" Module is : " + log.GetMessageList()[i].GetModule()); Console.WriteLine(" Log Type is : " + log.GetMessageList()[i].GetType()); Console.WriteLine(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } String jsonResponse = log.ToString(); } }NSCalendar *calendar = [NSCalendar currentCalendar]; NSDateComponents *components = [calendar components:(NSDayCalendarUnit | NSMonthCalendarUnit | NSYearCalendarUnit | NSWeekCalendarUnit) fromDate:[NSDate date]]; NSDateComponents *yesterdayComponents = [components copy]; [yesterdayComponents setDay:[yesterdayComponents day]-1]; NSDate *startDate = [calendar dateFromComponents:yesterdayComponents]; NSDate *endDate = [NSDate date] ; int max = 1; int offset = 0; [App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService fetchLogByDateRange:startDate endDate:endDate max:max offset:offset completionBlock:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { Log *response = (Log*)responseObj; NSLog(@"Response is %@" , response.strResponse); for (LogMessage *message in response.logMessageArray) { NSLog(@"module is =%@",message.module); NSLog(@"logTime is = %@",message.logTime); } } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];let max:Int32 = 1 let offset:Int32 = 0 let startDate = NSDate(timeIntervalSinceNow: -24*60*60) //change this as required let endDate = NSDate() App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.fetchLogByDateRange(startDate, endDate:endDate, max:max, offset:offset, completionBlock: { (success, response, exception) -> Void in if (success) { let log = response as! Log NSLog("%@", log.strResponse) for message in log.logMessageArray { NSLog("module is =%@",message.module); NSLog("logTime is = %@",message.logTime); } } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })Date startDate = new Date(new Date().getTime() - 60 * 60 * 1000) ; Date endDate = new Date(new Date().getTime()) ; int max = 1; int offset = 0; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogByDateRange(startDate,endDate,max,offset); ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } String jsonResponse = log.toString();DateTime startDate = DateTime.Today; DateTime endDate = DateTime.Now; int max = 1; int offset = 0; App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogByDateRange(startDate, endDate, max, offset, new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Response Is : " + response); Log log = (Log) response; for (int i = 0; i < log.GetMessageList().Count; i++) { App42Log.Console(" jsonResponse is : " + log.GetMessageList()[i].ToString()); App42Log.Console(" Message is : " + log.GetMessageList()[i].GetMessage()); App42Log.Console(" Module is : " + log.GetMessageList()[i].GetModule()); App42Log.Console(" Log Type is : " + log.GetMessageList()[i].GetType()); App42Log.Console(" Log Time is : " + log.GetMessageList()[i].GetLogTime()); } App42Log.Console("Success : " + log.ToString()); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }Not AvailableComing SoonComing SoonDateTime startDate = DateTime.Today; DateTime endDate = DateTime.Now; int max = 1; int offset = 0; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); Log log = logService.FetchLogByDateRange(startDate,endDate,max,offset); Console.WriteLine("message is " + log.GetMessageList()[0].GetMessage()); Console.WriteLine("module is " + log.GetMessageList()[0].GetModule()); String jsonResponse = log.ToString();$date = date(DATE_ATOM, mktime()); $date2 = strtotime($date); $newdate = strtotime('-2 day', strtotime($date)); $startDate = date('Y-m-j', $newdate); $endDate = date('Y-m-j', $date2); $max = 1; $offset = 0; App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $log = $logService->fetchLogByDateRange($startDate,$endDate,$max,$offset); $message = $log->getMessageList(); foreach ($message as $messageList) { print_r("msg is : " . $messageList->getMessage()); print_r("module is : " . $messageList->getModule()); print_r("type is : " . $messageList->getType()); print_r("logTime is : " . $messageList->getLogTime()); } $jsonResponse = $log->toString();Coming SoonComing Soonvar startDate:Date = new Date(new Date().getTime() - 1000 * 60 * 60 * 24* 20); var endDate:Date = new Date(new Date().getTime() + 100 * 60 * 60 * 24 * 10); var max:int = 1; var offset:int = 0; App42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.fetchLogByDateRangeByPaging(startDate, endDate, max, offset,new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { var log:Log = Log(response); if(log.getMessageList().length > 0) { for(var i:int=0;i<log.getMessageList().length;i++) { trace("Log Time is : " + Message(log.getMessageList()[i]).getLogTime()); trace("Message is " + Message(log.getMessageList()[i]).getMessage()); trace("Module is " + Message(log.getMessageList()[i]).getModule()); trace("Get Type is " + Message(log.getMessageList()[i]).getType()); } } } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonDate startDate = new Date(new Date().getTime() - 60 * 60 * 1000) ; Date endDate = new Date(new Date().getTime()) ; Integer max = new Integer(1); Integer offset = new Integer(0); App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); Log log = logService.fetchLogByDateRange(startDate,endDate,max,offset); System.out.println("message is " + ((Message)log.getMessageList().elementAt(0)).getMessage()); System.out.println("module is " + ((Message)log.getMessageList().elementAt(0)).getModule()); String jsonResponse = log.toString();
At occurrence of an event (for example, the user clicked on a purchase button inside your app), one can log events using setEvent method available by logging service as shown below. Similarly you can log other events as well at the time of occurrence.
Required Parameters
eventName - Name of the event which has to be logged.
String eventName = "eventName"; App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.setEvent(eventName,new App42CallBack() { public void onSuccess(Object response) { Log log = (Log)response; } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });String eventName = "eventName"; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.SetEvent(eventName,new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { Console.WriteLine("Success response : " + response); } }NSString *eventName = @"eventName"; [App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService setEventWithName:eventName completionBlock:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { Log *response = (Log*)responseObj; NSLog(@"Response is %@" , response.strResponse); for (LogMessage *message in response.logMessageArray) { NSLog(@"module is =%@",message.module); NSLog(@"logTime is = %@",message.logTime); } } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];let eventName = "eventName" App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.setEventWithName(eventName, completionBlock: { (success, response, exception) -> Void in if (success) { let log = response as! Log NSLog("%@", log.strResponse) for message in log.logMessageArray { NSLog("module is =%@",message.module) NSLog("logTime is = %@",message.logTime) } } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })String eventName = "eventName"; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); log =logService.setEvent(eventName);String eventName = "eventName"; App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.SetEvent(eventName, new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Success : " + response); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }var eventName = "eventName", var result ; App42.initialize("API_KEY","SECRET_KEY"); var logService = new App42Log(); logService.setEvent(eventName,{ success: function(object) { var logObj = JSON.parse(object); console.log(logObj) }); }, error: function(error) { console.log(error) } });Coming SoonComing SoonString eventName = "eventName"; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.SetEvent(eventName);$eventName = "eventName"; App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $logService->setEvent($eventName);Coming SoonComing SoonString eventName = "eventName"; App42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.setEventWithEventName( eventName,new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { trace("Response is "+response); } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonString eventName = "eventName"; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.setEvent(eventName);
At occurrence of an event (For example, the user clicked on a Purchase button inside your app), one can log events using setEvent method available by logging service as shown below. Similarly you can log other events at the time of occurrence.
Required Parameters
eventName - Name of the event which has to be logged.
moduleName - Name of the module.
String eventName = "eventName"; String moduleName = "moduleName"; App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.setEvent(moduleName, eventName, new App42CallBack() { public void onSuccess(Object response) { Log log = (Log)response; } public void onException(Exception ex) { System.out.println("Exception Message"+ex.getMessage()); } });String eventName = "eventName"; String moduleName = "moduleName"; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.SetEvent(moduleName,eventName,new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); } public void OnSuccess(Object response) { Console.WriteLine("Success response : " + response); } }NSString *eventName = @"eventName"; NSString *moduleName = @"moduleName"; [App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService setEventWithName:eventName forModule:moduleName completionBlock:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { Log *response = (Log*)responseObj; NSLog(@"Response is %@" , response.strResponse); for (LogMessage *message in response.logMessageArray) { NSLog(@"module is =%@",message.module); NSLog(@"logTime is = %@",message.logTime); } } else { NSLog(@"Exception = %@",[exception reason]); NSLog(@"HTTP error Code = %d",[exception httpErrorCode]); NSLog(@"App Error Code = %d",[exception appErrorCode]); NSLog(@"User Info = %@",[exception userInfo]); } }];let eventName = "eventName" let moduleName = "moduleName" App42API.initializeWithAPIKey("API_KEY" andSecretKey:"SECRET_KEY") let logService = App42API.buildLogService() as? LogService logService?.setEventWithName(eventName, forModule:moduleName, completionBlock: { (success, response, exception) -> Void in if (success) { let log = response as! Log NSLog("%@", log.strResponse) for message in log.logMessageArray { NSLog("module is =%@",message.module) NSLog("logTime is = %@",message.logTime) } } else { NSLog("%@", exception.reason!) NSLog("%d", exception.appErrorCode) NSLog("%d", exception.httpErrorCode) NSLog("%@", exception.userInfo!) } })String eventName = "eventName"; String moduleName = "moduleName"; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.setEvent(moduleName,eventName);String eventName = "eventName"; String moduleName = "moduleName"; App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.SetEvent(moduleName, eventName, new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnSuccess(object response) { App42Log.Console("Success : " + response); } public void OnException(Exception e) { App42Log.Console("Exception : " + e); } }var eventName = "eventName", var moduleName = "moduleName", var result ; App42.initialize("API_KEY","SECRET_KEY"); var logService = new App42Log(); logService.setEventWithModuleName(moduleName, eventName,{ success: function(object) { var logObj = JSON.parse(object); console.log(logObj) }, error: function(error) { console.log(error) } });Coming SoonComing SoonString eventName = "eventName"; String moduleName = "moduleName"; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.SetEvent(moduleName,eventName);$eventName = "eventName"; $moduleName = "moduleName"; App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); $logService->setEventWithModuleName($moduleName,$eventName);Coming SoonComing Soonvar moduleName:String = "moduleName"; var eventName:String = "eventName"; App42API.initialize("API_KEY","SECRET_KEY"); var logService:LogService = App42API.buildLogService(); logService.setEventWithModuleName(moduleName , eventName,new callback()); class callback implements App42CallBack { public function onSuccess(response:Object):void { trace("Response is "+response); } public function onException(exception:App42Exception):void { trace("Exception Message " + exception); } }Coming SoonString eventName = "eventName"; String moduleName = "moduleName"; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.setEvent(moduleName,eventName);
The functions available under Logging API can throw some exceptions in abnormal conditions. For example, if a developer is requesting the logs for the module which is not in the database, the function will throw the App42Exception (as shown below) with message as “Not Found” and the appErrorCode as “2700” and the details as “Logs for the module ‘@module’ does not exist”.
String moduleName = "moduleName"; App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); logService.fetchLogsByModule(moduleName, new App42CallBack() { public void onSuccess(Object response) { Log log = (Log)response; ArrayList<Log.Message> messageList = log.getMessageList(); for(int i=0;i<messageList.size();i++) { System.out.println("msg is " + messageList.get(i).getMessage()); System.out.println("module is " + messageList.get(i).getModule()); System.out.println("type is " + messageList.get(i).getType()); System.out.println("logTime is " + messageList.get(i).getLogTime()); } } public void onException(Exception ex) { App42Exception exception = (App42Exception)ex; int appErrorCode = exception.getAppErrorCode(); int httpErrorCode = exception.getHttpErrorCode(); if(appErrorCode == 2700) { // Handle here for Not Found (Logs for the module '@module' does not exist.) } else if(appErrorCode == 1401) { // handle here for Client is not authorized } else if(appErrorCode == 1500) { // handle here for Internal Server Error } String jsonText = ex.getMessage(); } });String moduleName = "moduleName"; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByModule(moduleName, new Callback()); public class Callback : App42Callback { public void OnException(App42Exception exception) { Console.WriteLine("Exception Message : " + exception); int appErrorCode = exception.GetAppErrorCode(); int httpErrorCode = exception.GetHttpErrorCode(); if(appErrorCode == 2700) { // Handle here for Not Found (Logs for the module '@module' does not exist.) } else if(appErrorCode == 1401) { // handle here for Client is not authorized } else if(appErrorCode == 1500) { // handle here for Internal Server Error } String jsonText = exception.GetMessage(); } public void OnSuccess(Object response) { Log log = (Log)response; String jsonResponse = log.ToString(); } }NSString *moduleName = @"moduleName"; [App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"]; LogService *logService = [App42API buildLogService]; [logService fetchLogsByModule:moduleName completionBlock:^(BOOL success, id responseObj, App42Exception *exception) { if (success) { Log *response = (Log*)responseObj; NSLog(@"Response is %@" , response.strResponse); } else { int appErrorCode = exception.appErrorCode; int httpErrorCode = exception.httpErrorCode; if(appErrorCode == 2700) { // Handle here for Not Found (Logs for the module '@module' does not exist.) } else if(appErrorCode == 1401) { // handle here for Client is not authorized } else if(appErrorCode == 1500) { // handle here for Internal Server Error } NSString *jsonText = exception.reason; } }];coming soonString moduleName = "moduleName"; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); try { Log log = logService.fetchLogsByModule(moduleName); } catch(App42Exception ex) { int appErrorCode = ex.getAppErrorCode(); int httpErrorCode = ex.getHttpErrorCode(); if(appErrorCode == 2700) { // Handle here for Not Found (Logs for the module '@module' does not exist.) } else if(appErrorCode == 1401) { // handle here for Client is not authorized } else if(appErrorCode == 1500) { // handle here for Internal Server Error } String jsonText = ex.getMessage(); }String moduleName = "moduleName"; App42Log.SetDebug(true); //Print output in your editor console App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); logService.FetchLogsByModule(moduleName, new UnityCallBack()); public class UnityCallBack : App42CallBack { public void OnException(Exception ex) { int appErrorCode = ex.GetAppErrorCode(); int httpErrorCode = ex.GetHttpErrorCode(); if(appErrorCode == 2700) { // Handle here for Not Found (Logs for the module '@module' does not exist.) } else if(appErrorCode == 1401) { // handle here for Client is not authorized } else if(appErrorCode == 1500) { // handle here for Internal Server Error } String jsonText = ex.GetMessage(); } public void OnSuccess(object response) { App42Log.Console("Success : " + response); } }Not AvailableComing SoonComing SoonString moduleName = "moduleName"; App42API.Initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.BuildLogService(); try { Log log = logService.FetchLogsByModule(moduleName); } catch(App42Exception ex) { int appErrorCode = ex.GetAppErrorCode(); int httpErrorCode = ex.GetHttpErrorCode(); if(appErrorCode == 2700) { // Handle here for Not Found (Logs for the module '@module' does not exist.) } else if(appErrorCode == 1401) { // handle here for Client is not authorized } else if(appErrorCode == 1500) { // handle here for Internal Server Error } String jsonText = ex.GetMessage(); }$moduleName = "moduleName"; App42API::initialize("API_KEY","SECRET_KEY"); $logService = App42API::buildLogService(); try { $log = $logService->fetchLogsByModule($moduleName); } catch(App42Exception $ex ) { $appErrorCode = $ex->getAppErrorCode(); $httpErrorCode = $ex->getHttpErrorCode(); if($appErrorCode == 2700) { // Handle here for Not Found (Logs for the module '@module' does not exist.) } else if($appErrorCode == 1401) { // handle here for Client is not authorized } else if($appErrorCode == 1500) { // handle here for Internal Server Error } String $jsonText = $ex->getMessage(); }Coming SoonComing SoonComing SoonComing SoonString moduleName = "moduleName"; App42API.initialize("API_KEY","SECRET_KEY"); LogService logService = App42API.buildLogService(); try { Log log = logService.fetchLogsByModule(moduleName); } catch(App42Exception ex) { int appErrorCode = ex.getAppErrorCode(); int httpErrorCode = ex.getHttpErrorCode(); if(appErrorCode == 2700) { // Handle here for Not Found (Logs for the module '@module' does not exist.) } else if(appErrorCode == 1401) { // handle here for Client is not authorized } else if(appErrorCode == 1500) { // handle here for Internal Server Error } String jsonText = ex.getMessage(); }
Functions in Log API might throw exceptions with following HTTP and Application Error Codes (along with their descriptions):
1400 - BAD REQUEST - The requested parameters are invalid.
1401 - UNAUTHORIZED - Client is not authorized.
1500 - INTERNAL SERVER ERROR - Internal Server Error. Please try again.
2700 - NOT FOUND - Logs for the module '@module' does not exist.
2701 - NOT FOUND - Logs for the type '@type' does not exist.
2702 - Not Found - Logs between startDate '@startDate' and endDate '@endDate' does not exist.
2703 - NOT FOUND - Logs for the module '@module' with text '@text' does not exist.
2704 - NOT FOUND - The number of logs for the module '@module' are less than the specified offset : + "offset".
2705 - NOT FOUND - The number of logs for the type '@type' are less than the specified offset : + "offset".
2706 - NOT FOUND - The number of logs betweem startDate '@startDate' and EndDate '@endDate' are less than the specified offset : + "offset".
2707 - NOT FOUND - The number of logs for the module '@module' with text '@text' are less than the specified offset : + "offset".