Click or drag to resize

IWsEndUserGetLogs Method

Returns the list of log messages generated during the period required by the virtual server specified by the input parameter. This method can be used to manage log information during normal operation of the virtual server, or to obtain debug information as a result of a call to the methods of the web service. GetLogs can be used only after passing the authentication phase. And 'possible to apply the logs of a specific virtual server, indicating the ID as an input parameter, or request a log of all virtual server created, specifying ServerID as a null value. It 'also allowed indicate a time interval, to limit to a specific period of time the extraction of information. It 'also possible to omit the start date, end date, or both, to remove some or all of the time limits.

Namespace:  Aruba.Cloud.WsEndUser
Assembly:  Aruba.Cloud.WsEndUser (in Aruba.Cloud.WsEndUser.dll) Version: (
WsResult<Log[]> GetLogs(
	Nullable<int> serverId,
	Nullable<DateTime> from,
	Nullable<DateTime> to


Type: SystemNullableInt32
Nullable value type System.Int32 which is the unique identifier (ID) of the server they are associated with the log. If ServerID == null are extracted logs from all servers
Type: SystemNullableDateTime
Nullable value of type System.DateTime that represents the lower limit of the period of extraction of the logs. If from == null , the extraction of the log does not set a lower limit for the period.
Type: SystemNullableDateTime
Nullable value of type System.DateTime that represents the upper limit of the period of extraction of the logs. If to == null , the extraction of the log is not set an upper limit for the period.

Return Value

Type: WsResultLog
The method returns an object WsResult<LOG> containing information on the outcome of the processing. The Value property contains an array of such objects Log. Log each object contains information about its id, operation name, message, date of creation and last update, status, user, server, etc.. For more details the information returned by the method see the class definition Log and class Log .
The following is extracted and shown in the list of console log of the operations executed in the last 7 days. GetLogs The method is called after a successful authentication. The credentials are passed to the method GetLogs within the header of the SOAP request.
static void Main(string[] args)
  WsEndUserClient client = GetClientAndSetCredentials();

  WsResultOfArrayOfLog result =
    client.GetLogs(701, System.DateTime.Now.AddDays(-7), System.DateTime.Now);

  foreach (Log item in result.Value)
    Console.WriteLine("{0} {1} {2} - {3} - server: {4}", 

See Also