public async Task <IActionResult> GetErrorLogs( [FromQuery] string serviceName, string exceptionTypeName, string message, DateTime?dateFrom, DateTime?dateTo) { try { return(Ok(await _errorLogService.GetErrorLogsAsync(serviceName: serviceName, exceptionTypeName: exceptionTypeName, message: message, dateFrom: dateFrom, dateTo: dateTo))); } catch (SerializationException e) { return(BadRequest($"{e.Message} : {e.Content}")); } }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='serviceName'> /// </param> /// <param name='exceptionTypeName'> /// </param> /// <param name='message'> /// </param> /// <param name='dateFrom'> /// </param> /// <param name='dateTo'> /// </param> public static object GetErrorLogs(this IErrorLog operations, string serviceName = default(string), string exceptionTypeName = default(string), string message = default(string), System.DateTime?dateFrom = default(System.DateTime?), System.DateTime?dateTo = default(System.DateTime?)) { return(operations.GetErrorLogsAsync(serviceName, exceptionTypeName, message, dateFrom, dateTo).GetAwaiter().GetResult()); }