/// <summary> /// Initializes a new instance of the <see cref="LogParameters"/> class for retrieving logs from a standard time period. /// </summary> /// <param name="objectId">ID of the object to retrieve logs from. If this value is null or 0, logs will be retrieved from the root group.</param> /// <param name="recordAge">Time period to retrieve logs from. Logs will be retrieved from the beginning of this period until the current date and time, ordered from newest to oldest.</param> /// <param name="count">Number of logs to retrieve. Depending on the number of logs stored in the system, specifying a high number may cause the request to timeout.</param> /// <param name="status">Log event types to retrieve records for. If no types are specified, all record types will be retrieved.</param> public LogParameters(int?objectId, RecordAge recordAge = PrtgAPI.RecordAge.LastWeek, int?count = 500, params LogStatus[] status) : this(objectId) { if (recordAge != PrtgAPI.RecordAge.All) { RecordAge = recordAge; } Count = count; if (status != null && status.Length > 0) { Status = status; } }
/// <summary> /// Initializes a new instance of the <see cref="LogParameters"/> class for retrieving logs from a standard time period. /// </summary> /// <param name="objectId">ID of the object to retrieve logs from. If this value is null or 0, logs will be retrieved from the root group.</param> /// <param name="timeSpan">Time period to retrieve logs from. Logs will be retrieved from the beginning of this period until the current date and time, ordered from newest to oldest.</param> /// <param name="count">Number of logs to retrieve. Depending on the number of logs stored in the system, specifying a high number may cause the request to timeout.</param> /// <param name="status">Log event types to retrieve records for. If no types are specified, all record types will be retrieved.</param> public LogParameters(int?objectId, RecordAge timeSpan = PrtgAPI.RecordAge.LastWeek, int count = 50, params LogStatus[] status) : this(objectId) { if (timeSpan != PrtgAPI.RecordAge.AllTime) { RecordAge = timeSpan; } Count = count; if (status != null && status.Length > 0) { Status = status; } }