Class ServiceLogger
Logging functionality for Service layer calls; accessed from generated code
Namespace: SuperOffice.CRM.Services.Implementation
Assembly: SoCore.dll
Syntax
public static class ServiceLogger : Object
Remarks
This logging is controlled by the LogServiceCalls key (True/False) and optionally the LoggedServices key (comma-separated list of service names to log)
Fields
NoReturnValue
Logging functionality for Service layer calls; accessed from generated code
Declaration
public const string NoReturnValue = "!!noreturn!!"
Field Value
Type | Description |
---|---|
String |
Remarks
This logging is controlled by the LogServiceCalls key (True/False) and optionally the LoggedServices key (comma-separated list of service names to log)
Methods
DeferredLogCall(String, String)
Log a service call that does not have parameters nor a return value
Declaration
public static ServiceLogContext DeferredLogCall(string agentName, string methodName)
Parameters
Type | Name | Description |
---|---|---|
String | agentName | Agent/service name |
String | methodName | Method name |
Returns
Type | Description |
---|---|
ServiceLogContext |
Remarks
This logging is controlled by the LogServiceCalls key (True/False) and optionally the LoggedServices key (comma-separated list of service names to log)
DeferredLogCall(String, String, Object)
Log a service call that has no parameters, but does have a return value
Declaration
public static ServiceLogContext DeferredLogCall(string agentName, string methodName, object returnValue)
Parameters
Type | Name | Description |
---|---|---|
String | agentName | Agent/service name |
String | methodName | Method name |
Object | returnValue |
Returns
Type | Description |
---|---|
ServiceLogContext |
Remarks
This logging is controlled by the LogServiceCalls key (True/False) and optionally the LoggedServices key (comma-separated list of service names to log)
DeferredLogCall(String, String, String, Object)
Log a service call that does not have a return value
Declaration
public static ServiceLogContext DeferredLogCall(string agentName, string methodName, string parameterName, object parameterValue)
Parameters
Type | Name | Description |
---|---|---|
String | agentName | Agent/service name |
String | methodName | Method name |
String | parameterName | |
Object | parameterValue |
Returns
Type | Description |
---|---|
ServiceLogContext |
Remarks
This logging is controlled by the LogServiceCalls key (True/False) and optionally the LoggedServices key (comma-separated list of service names to log)
DeferredLogCall(String, String, String, Object, Object)
Log a service call that has a single parameter and a return value
Declaration
public static ServiceLogContext DeferredLogCall(string agentName, string methodName, string parameterName, object parameterValue, object returnValue)
Parameters
Type | Name | Description |
---|---|---|
String | agentName | Agent/service name |
String | methodName | Method name |
String | parameterName | |
Object | parameterValue | |
Object | returnValue |
Returns
Type | Description |
---|---|
ServiceLogContext |
Remarks
This logging is controlled by the LogServiceCalls key (True/False) and optionally the LoggedServices key (comma-separated list of service names to log)
DeferredLogCall(String, String, String[], Object[])
Log a service call that does not have a return value
Declaration
public static ServiceLogContext DeferredLogCall(string agentName, string methodName, string[] parameterNames, object[] parameterValues)
Parameters
Type | Name | Description |
---|---|---|
String | agentName | Agent/service name |
String | methodName | Method name |
String[] | parameterNames | Array of parameters names, same length as array of parameter values; both can be null but only at the same time |
Object[] | parameterValues | Array of parameter values, same length as array of parameter names; both can be null but only at the same time |
Returns
Type | Description |
---|---|
ServiceLogContext |
Remarks
This logging is controlled by the LogServiceCalls key (True/False) and optionally the LoggedServices key (comma-separated list of service names to log)
DeferredLogCall(String, String, String[], Object[], Object)
Log a service call that returns a value
Declaration
public static ServiceLogContext DeferredLogCall(string agentName, string methodName, string[] parameterNames, object[] parameterValues, object returnValue)
Parameters
Type | Name | Description |
---|---|---|
String | agentName | Agent/service name |
String | methodName | Method name |
String[] | parameterNames | Array of parameters names, same length as array of parameter values; both can be null but only at the same time |
Object[] | parameterValues | Array of parameter values, same length as array of parameter names; both can be null but only at the same time |
Object | returnValue | Return value |
Returns
Type | Description |
---|---|
ServiceLogContext |
Remarks
This logging is controlled by the LogServiceCalls key (True/False) and optionally the LoggedServices key (comma-separated list of service names to log)
FormatServiceLogInformation(String, String, String[], Object[], Object, TimeSpan)
Logging functionality for Service layer calls; accessed from generated code
Declaration
public static string FormatServiceLogInformation(string agentName, string methodName, string[] parameterNames, object[] parameterValues, object returnValue, TimeSpan executionTime)
Parameters
Type | Name | Description |
---|---|---|
String | agentName | |
String | methodName | |
String[] | parameterNames | |
Object[] | parameterValues | |
Object | returnValue | |
TimeSpan | executionTime |
Returns
Type | Description |
---|---|
String |
Remarks
This logging is controlled by the LogServiceCalls key (True/False) and optionally the LoggedServices key (comma-separated list of service names to log)
LogCall(String, String, String[], Object[], TimeSpan, Object)
Log a service call that returns a value
Declaration
public static void LogCall(string agentName, string methodName, string[] parameterNames, object[] parameterValues, TimeSpan executionTime, object returnValue)
Parameters
Type | Name | Description |
---|---|---|
String | agentName | Agent/service name |
String | methodName | Method name |
String[] | parameterNames | Array of parameters names, same length as array of parameter values; both can be null but only at the same time |
Object[] | parameterValues | Array of parameter values, same length as array of parameter names; both can be null but only at the same time |
TimeSpan | executionTime | Service execution time |
Object | returnValue | Return value |
Remarks
This logging is controlled by the LogServiceCalls key (True/False) and optionally the LoggedServices key (comma-separated list of service names to log)