Browse Source

新增日志文件

林豪 左 3 years ago
parent
commit
9059b25fe1
2 changed files with 13 additions and 6 deletions
  1. 8 3
      DBHelper/DbLog.cs
  2. 5 3
      Projects/永冠OPP/WCS.Service/config.json

+ 8 - 3
DBHelper/DbLog.cs

@@ -8,7 +8,7 @@ namespace DBHelper
         /// <summary>
         /// 日志名称
         /// </summary>
-        public string LogName => "DB";
+        public string LogName => "Db";
 
         /// <summary>
         /// 日志
@@ -27,7 +27,7 @@ namespace DBHelper
         {
             SubLogNames = new Dictionary<string, string>
             {
-                {"DB", "Db" }
+                ["DB"] = "Db"
             };
             LogHelper.Init(this);
         }
@@ -38,7 +38,7 @@ namespace DBHelper
         /// <param name="msg"></param>
         public static void DBEX(string msg)
         {
-            Log.Info(msg, "DBEX");
+            Log.Info(msg, "DB_EX");
         }
 
         /// <summary>
@@ -49,5 +49,10 @@ namespace DBHelper
         {
             Log.Info(msg, "DB_CLEAN");
         }
+
+        public static void INFO_PLCREADLOG(string msg)
+        {
+            Log.Info(msg, "INFO_PLCREADLOG");
+        }
     }
 }

+ 5 - 3
Projects/永冠OPP/WCS.Service/config.json

@@ -14,7 +14,8 @@
         "INFO_SRMINFO": "Info_SRMInfo",
         "INFO_SYTASKSTATUS": "Info_SyTaskTatus",
         "INFO_WMSREQUEST": "INFO_WMSRequest",
-        "INFO_WARN": "Info_Warn"
+        "INFO_WARN": "Info_Warn",
+        "INFO_PLCREADLOG": "Info_PlcReadLog"
       }
     },
     {
@@ -33,8 +34,9 @@
       "Name": "Db",
       "FileName": "D:\\WCSLog\\",
       "SubLogNames": {
-        "DBEX": "Db_Ex",
-        "DB_CLEAN": "Db_Clean"
+        "DB_EX": "Db_Ex",
+        "DB_CLEAN": "Db_Clean",
+        "INFO_PLCREADLOG": "Info_PlcReadLog"
       }
     }
   ]