/// <summary> /// Log 日志 /// </summary> /// <param name="ex"></param> /// <param name="API_Url"></param> public static void K_log(Exception ex, string API_Url) { try { web_log log = new web_log() { Log = $"{ex.Message} / {API_Url}", LogTime = DateTime.Now, LogFrom = "CallRemoteAPI", LogType = "Api_Error" }; string json_str = RabbitMqHelper.Object_to_Json <web_log>(OperationType.Operation.log, log); RabbitMqHelper.SendMessageToQueue(OperationType.Mq_queue_name, json_str); } catch (Exception) { } }
/// <summary> /// Log 日志 /// </summary> /// <param name="ex"></param> /// <param name="API_Url"></param> public static void K_log(Exception ex, string parameter, string log_from, string log_type) { try { web_log log = new web_log() { Log = $"{ex.Message} / {parameter}", LogTime = DateTime.Now, LogFrom = log_from, LogType = log_type }; string json_str = RabbitMqHelper.Object_to_Json <web_log>(OperationType.Operation.log, log); RabbitMqHelper.SendMessageToQueue(OperationType.Mq_queue_name, json_str); } catch (Exception) { } }