The LogHelper function helps you with the tracing or logging. The ILogHelper instance is returned when GetLogHelper() is called provides you with the following methods.
var logHelper = GetLogHelper();
logHelper.LogTrace("Trace Statement");
logHelper.LogDebug("Debug Statement");
logHelper.LogWarning("Warning Statement");
logHelper.LogInformation("Info Statement");
AccountQueryModel account = new AccountQueryModel(){
Id= "0013i0000043m9eAAA",
Name = "Account_B5F83C"
};
logHelper.LogDebug(account);
logHelper.LogError("Error Message", new Exception("SystemException"));
public class AccountQueryModel
{
public string Id {get; set;}
public string Name {get; set;}
public string Type {get; set;}
}
When debugging or troubleshooting callback related issues, follow the minimal logging approach and add log statements in the callback code and then remove log statements from the code once it is done.