add log
This commit is contained in:
parent
3718f3d182
commit
f507a0d1b1
@ -405,7 +405,7 @@ namespace solarApp.Service
|
||||
_logger.LogError("【ProcInvSvc】執行失敗[{0}]在{1}逆變器day補償 - [Exception]:{2}", _siteID, _date1, ex.ToString());
|
||||
}
|
||||
//throw ex;
|
||||
arclog.insert_log(_powerStationID, "inverter_history_day step1 ", 0, "inverter_history_day", "insert inverter_history_day error", "0", "", "", conn, cmd);
|
||||
arclog.insert_log(_powerStationID, "inverter_history_day step1 ", 0, "inverter_history_day", "insert inverter_history_day error", "0", "", ex.Message, conn, cmd);
|
||||
}
|
||||
#endregion day
|
||||
|
||||
@ -470,7 +470,7 @@ namespace solarApp.Service
|
||||
_logger.LogError("【ProcInvSvc】執行失敗[{0}]在{1}逆變器month補償", _siteID, _date1);
|
||||
_logger.LogError("【ProcInvSvc】執行失敗[{0}]在{1}逆變器month補償 - [Exception]:{2}", _siteID, _date1, ex.ToString());
|
||||
}
|
||||
arclog.insert_log(_powerStationID, "inverter_history_month step1 ", 0, "inverter_history_month", "insert inverter_history_month error", "0", "", "", conn, cmd);
|
||||
arclog.insert_log(_powerStationID, "inverter_history_month step1 ", 0, "inverter_history_month", "insert inverter_history_month error", "0", "", ex.Message, conn, cmd);
|
||||
// throw ex;
|
||||
}
|
||||
|
||||
|
||||
@ -562,7 +562,7 @@ namespace solarApp.Service
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
arclog.insert_log(_powerStationID, "sensor step1 ", 0, "sensor_history_", "insert sensor error", "err", "", "", conn, cmd);
|
||||
arclog.insert_log(_powerStationID, "sensor step1 ", 0, "sensor_history_", "insert sensor error", "err", "", ex.Message, conn, cmd);
|
||||
|
||||
//throw ex;
|
||||
}
|
||||
@ -628,7 +628,7 @@ namespace solarApp.Service
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
arclog.insert_log(_powerStationID, "sensor step1 irrDayHour", 0, "sensor_history_", "sensor_history_hour error", "err", "", "", conn, cmd);
|
||||
arclog.insert_log(_powerStationID, "sensor step1 irrDayHour", 0, "sensor_history_", "sensor_history_hour error", "err", "", ex.Message, conn, cmd);
|
||||
//throw ex;
|
||||
}
|
||||
conn.Close();
|
||||
@ -716,7 +716,7 @@ namespace solarApp.Service
|
||||
catch (Exception ex)
|
||||
{
|
||||
//throw ex;
|
||||
arclog.insert_log(_powerStationID, "sensor step1 meter_hour", 0, "meter_history_hour", "meter_history_hour error", "err", "", "", conn, null);
|
||||
arclog.insert_log(_powerStationID, "sensor step1 meter_hour", 0, "meter_history_hour", "meter_history_hour error", "err", "", ex.Message, conn, null);
|
||||
}
|
||||
conn.Close();
|
||||
}
|
||||
@ -762,7 +762,7 @@ namespace solarApp.Service
|
||||
catch (Exception ex)
|
||||
{
|
||||
//throw ex;
|
||||
arclog.insert_log(_powerStationID, "sensor step1 meter_hour", 0, "meter_history_hour", "meter_history_hour error", "0", "", "", conn, null);
|
||||
arclog.insert_log(_powerStationID, "sensor step1 meter_hour", 0, "meter_history_hour", "meter_history_hour error", "0", "", ex.Message, conn, null);
|
||||
}
|
||||
conn.Close();
|
||||
}
|
||||
@ -1086,7 +1086,7 @@ namespace solarApp.Service
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
arclog.insert_log(_powerStationID, "sensor step1 for irrDayHour", duration.TotalSeconds, "sensor_history_hour", "update sensor hour", "0", "", rowCT.ToString(), conn, cmd);
|
||||
arclog.insert_log(_powerStationID, "sensor step1 for irrDayHour", duration.TotalSeconds, "sensor_history_hour", "update sensor hour", "0", "", ex.Message, conn, cmd);
|
||||
|
||||
//throw ex;
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ using MySql.Data.MySqlClient;
|
||||
using Dapper;
|
||||
using solarApp.Model;
|
||||
using System.Configuration;
|
||||
//using Google.Protobuf.WellKnownTypes;
|
||||
|
||||
namespace solarApp.Service
|
||||
{
|
||||
@ -31,6 +32,7 @@ namespace solarApp.Service
|
||||
//public string _date2 { get; set; }
|
||||
public string _powerStationID { get; set; }
|
||||
|
||||
procArchiveLog arclog = new procArchiveLog();
|
||||
|
||||
public bool clearData()
|
||||
{
|
||||
@ -71,7 +73,8 @@ namespace solarApp.Service
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
arclog.insert_log(_powerStationID, "clearData procStation", 0, "sensor_history_hour", "update sensor hour", "0", "", ex.Message, null, null);
|
||||
// throw ex;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@ -365,8 +368,8 @@ namespace solarApp.Service
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
arclog.insert_log(_powerStationID, "insert_station ", 0, "insert_station", "insert_station", "0", "", ex.Message, conn, cmd);
|
||||
//throw ex;
|
||||
arclog.insert_log(_powerStationID, "insert_station ", 0, "insert_station", "insert_station", "0", "", ex.Message, null, null);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@ -389,7 +392,8 @@ namespace solarApp.Service
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
arclog.insert_log(_powerStationID, "update_powerStationPerHour ", 0, table_name, "update_powerStationPerHour", "0", "", ex.Message, null, null);
|
||||
|
||||
}
|
||||
//result = await conn.QueryFirstOrDefaultAsync<PowerStationHistory>(sql, new { DateTime = dateTime });
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user