From 8658c02633f9746781d2e6f5da9998eef8c0e0a7 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期五, 28 十月 2022 16:31:52 +0800
Subject: [PATCH] 动态列(点检项目、维修项目、维修检验项目、保养项目、产品与器具清单及维护、工作中心、工序、生产资源、生产班组、不良原因、故障原因、检验项目、检验项目分类、工序工价及维护、系统上机日志查询、系统参数查询、系统模块信息查询、系统单据类型、会计期间、公告信息维护)

---
 WebAPI/LogService.cs |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/WebAPI/LogService.cs b/WebAPI/LogService.cs
index 9168f4d..7762f83 100644
--- a/WebAPI/LogService.cs
+++ b/WebAPI/LogService.cs
@@ -11,7 +11,23 @@
     public class LogService
     {
         private static readonly object lockObj = new object();
-     
+
+        public static void WriteAsync(object obj, string filePath = "Vlog", bool isAppend = true)
+        {
+            Task.Run(() =>
+            {
+                Write(obj, filePath, isAppend);
+            });
+        }
+
+        public static void WriteAsync<T>(object obj, string filePath = "Vlog", bool isAppend = true)
+        {
+            Task.Run(() =>
+            {
+                Write(obj, $@"{filePath}\{typeof(T).Name}", isAppend);
+            }); 
+        }
+
         #region 鏃ュ織
         public static void Write(object obj, string filePath = "Vlog", bool isAppend = true)
         {

--
Gitblit v1.9.1