日志整理

master
lxw 5 months ago
parent 0d0228b855
commit b5ff5a4a75

@ -68,6 +68,7 @@ public class PlcApi
/// <returns></returns>
public static bool WriteEntranceLamp(ushort data)
{
Log.Info($"PlcApi writeEntranceLamp start data={data}");
var writeEntranceLamp = PlcMgr.WriteEntranceLamp(data);
Log.Info($"PlcApi writeEntranceLamp resp={writeEntranceLamp}");
return writeEntranceLamp;
@ -82,6 +83,7 @@ public class PlcApi
/// <returns></returns>
public static bool WriteExistLamp(ushort data)
{
Log.Info($"PlcApi WriteExistLamp start data={data}");
var writeExistLamp = PlcMgr.WriteExistLamp(data);
Log.Info($"PlcApi WriteExistLamp resp={writeExistLamp}");
return writeExistLamp;
@ -95,6 +97,7 @@ public class PlcApi
/// <returns></returns>
public static bool DistributeSelectPack(string inBinNo, string outBinNo)
{
Log.Info($"PlcApi DistributeSelectPack start inBinNo={inBinNo} outBinNo={outBinNo}");
return PlcMgr.DistributeBinNo(inBinNo, outBinNo);
}
@ -132,6 +135,7 @@ public class PlcApi
/// <returns></returns>
public static bool HoldOn()
{
Log.Info($"PlcApi start HoldOn ");
var holdOn = PlcMgr.HoldOn();
Log.Info($"PlcApi HoldOn resp={holdOn}");
return holdOn;
@ -144,6 +148,7 @@ public class PlcApi
/// <returns></returns>
public static ushort ChannelStatus()
{
Log.Info($"PlcApi start ChannelStatus ");
PlcMgr.ResetPlc();
var channelStatus = PlcMgr.ChannelStatus();
Log.Info($"PlcApi ChannelStatus resp= {channelStatus}");
@ -157,6 +162,7 @@ public class PlcApi
/// <returns>6未连接</returns>
public static int ReadPlcTaskStatus()
{
Log.Info($"PlcApi start ReadPlcTaskStatus ");
var readPlcTaskStatus = PlcMgr.ReadPlcTaskStatus();
Log.Info($"PlcApi ReadPlcTaskStatus resp= {readPlcTaskStatus}");
return readPlcTaskStatus;

@ -7,7 +7,7 @@ namespace Service.Execute.Api;
public class TBoxApi
{
private static readonly ILog Log = LogManager.GetLogger("TBoxApi");
private static readonly ILog Log = LogManager.GetLogger("TboxApi");
private static readonly string BASE_URL = "http://localhost:5036";
@ -21,7 +21,7 @@ public class TBoxApi
public static async Task<TboxCarInfoModel> GetCarInfo(string carNo)
{
Log.Info(" TBoxApi GetCarInfo");
Log.Info($" TBoxApi GetCarInfo carNo={carNo}");
string url = BASE_URL + "/getCarInfo/" + carNo;
try
{
@ -62,7 +62,7 @@ public class TBoxApi
public static async Task<bool> IsConnected(string carNo)
{
Log.Info("IsConnected");
Log.Info($"IsConnected carNo={carNo}");
string url = BASE_URL + "/getCarInfo/"+carNo;
try
{
@ -71,6 +71,7 @@ public class TBoxApi
if (!String.IsNullOrWhiteSpace(s))
{
tboxCarInfoModel = JsonConvert.DeserializeObject<TboxCarInfoModel>(s);
Log.Info($"IsConnected resp={tboxCarInfoModel}");
}
Log.Info($"GetCarInfo resp = {tboxCarInfoModel}");
@ -146,7 +147,7 @@ public class TBoxApi
public static async Task<List<TboxCarInfoModel>> GetCarInfoList()
{
Log.Info(" TBoxApi GetCarInfoList start");
Log.Info(" TBoxApi GetCarInfoList start ");
string url = BASE_URL + "/getCarInfoList" ;
try
{

Loading…
Cancel
Save