zoule 8 月之前
父节点
当前提交
4a98214e3f

+ 8 - 0
Service/CgDbScan/ILLink/ILLink.Descriptors.LibraryBuild.xml

@@ -0,0 +1,8 @@
+<linker>
+  <assembly fullname="System.Diagnostics.DiagnosticSource">
+    <type fullname="System.Diagnostics.Metrics.MetricsEventSource">
+      <!-- Used by System.Private.CoreLib via reflection to init the EventSource -->
+      <method name="GetInstance" />
+    </type>
+  </assembly>
+</linker>

+ 8 - 0
Service/CheckServer/ILLink/ILLink.Descriptors.LibraryBuild.xml

@@ -0,0 +1,8 @@
+<linker>
+  <assembly fullname="System.Diagnostics.DiagnosticSource">
+    <type fullname="System.Diagnostics.Metrics.MetricsEventSource">
+      <!-- Used by System.Private.CoreLib via reflection to init the EventSource -->
+      <method name="GetInstance" />
+    </type>
+  </assembly>
+</linker>

+ 8 - 0
Service/CpuCgServer/ILLink/ILLink.Descriptors.LibraryBuild.xml

@@ -0,0 +1,8 @@
+<linker>
+  <assembly fullname="System.Diagnostics.DiagnosticSource">
+    <type fullname="System.Diagnostics.Metrics.MetricsEventSource">
+      <!-- Used by System.Private.CoreLib via reflection to init the EventSource -->
+      <method name="GetInstance" />
+    </type>
+  </assembly>
+</linker>

+ 8 - 0
Service/GpuCgServer/ILLink/ILLink.Descriptors.LibraryBuild.xml

@@ -0,0 +1,8 @@
+<linker>
+  <assembly fullname="System.Diagnostics.DiagnosticSource">
+    <type fullname="System.Diagnostics.Metrics.MetricsEventSource">
+      <!-- Used by System.Private.CoreLib via reflection to init the EventSource -->
+      <method name="GetInstance" />
+    </type>
+  </assembly>
+</linker>

+ 8 - 0
Service/X1LeoTaskServer54/ILLink/ILLink.Descriptors.LibraryBuild.xml

@@ -0,0 +1,8 @@
+<linker>
+  <assembly fullname="System.Diagnostics.DiagnosticSource">
+    <type fullname="System.Diagnostics.Metrics.MetricsEventSource">
+      <!-- Used by System.Private.CoreLib via reflection to init the EventSource -->
+      <method name="GetInstance" />
+    </type>
+  </assembly>
+</linker>

+ 8 - 0
Service/X2D1TaskServer/ILLink/ILLink.Descriptors.LibraryBuild.xml

@@ -0,0 +1,8 @@
+<linker>
+  <assembly fullname="System.Diagnostics.DiagnosticSource">
+    <type fullname="System.Diagnostics.Metrics.MetricsEventSource">
+      <!-- Used by System.Private.CoreLib via reflection to init the EventSource -->
+      <method name="GetInstance" />
+    </type>
+  </assembly>
+</linker>

+ 8 - 0
Service/X2D1TaskServer54/ILLink/ILLink.Descriptors.LibraryBuild.xml

@@ -0,0 +1,8 @@
+<linker>
+  <assembly fullname="System.Diagnostics.DiagnosticSource">
+    <type fullname="System.Diagnostics.Metrics.MetricsEventSource">
+      <!-- Used by System.Private.CoreLib via reflection to init the EventSource -->
+      <method name="GetInstance" />
+    </type>
+  </assembly>
+</linker>

+ 8 - 0
Service/X2LeoTaskServer54/ILLink/ILLink.Descriptors.LibraryBuild.xml

@@ -0,0 +1,8 @@
+<linker>
+  <assembly fullname="System.Diagnostics.DiagnosticSource">
+    <type fullname="System.Diagnostics.Metrics.MetricsEventSource">
+      <!-- Used by System.Private.CoreLib via reflection to init the EventSource -->
+      <method name="GetInstance" />
+    </type>
+  </assembly>
+</linker>

+ 8 - 0
Service/X3Leo1TaskServer54/ILLink/ILLink.Descriptors.LibraryBuild.xml

@@ -0,0 +1,8 @@
+<linker>
+  <assembly fullname="System.Diagnostics.DiagnosticSource">
+    <type fullname="System.Diagnostics.Metrics.MetricsEventSource">
+      <!-- Used by System.Private.CoreLib via reflection to init the EventSource -->
+      <method name="GetInstance" />
+    </type>
+  </assembly>
+</linker>

+ 8 - 0
Service/X3LeoTaskServer54/ILLink/ILLink.Descriptors.LibraryBuild.xml

@@ -0,0 +1,8 @@
+<linker>
+  <assembly fullname="System.Diagnostics.DiagnosticSource">
+    <type fullname="System.Diagnostics.Metrics.MetricsEventSource">
+      <!-- Used by System.Private.CoreLib via reflection to init the EventSource -->
+      <method name="GetInstance" />
+    </type>
+  </assembly>
+</linker>

+ 8 - 0
Service/X3RefTaskServer54/ILLink/ILLink.Descriptors.LibraryBuild.xml

@@ -0,0 +1,8 @@
+<linker>
+  <assembly fullname="System.Diagnostics.DiagnosticSource">
+    <type fullname="System.Diagnostics.Metrics.MetricsEventSource">
+      <!-- Used by System.Private.CoreLib via reflection to init the EventSource -->
+      <method name="GetInstance" />
+    </type>
+  </assembly>
+</linker>

+ 8 - 0
Service/X3TaskServer54/ILLink/ILLink.Descriptors.LibraryBuild.xml

@@ -0,0 +1,8 @@
+<linker>
+  <assembly fullname="System.Diagnostics.DiagnosticSource">
+    <type fullname="System.Diagnostics.Metrics.MetricsEventSource">
+      <!-- Used by System.Private.CoreLib via reflection to init the EventSource -->
+      <method name="GetInstance" />
+    </type>
+  </assembly>
+</linker>

+ 8 - 0
XdCxRhDW.App/ILLink/ILLink.Descriptors.LibraryBuild.xml

@@ -0,0 +1,8 @@
+<linker>
+  <assembly fullname="System.Diagnostics.DiagnosticSource">
+    <type fullname="System.Diagnostics.Metrics.MetricsEventSource">
+      <!-- Used by System.Private.CoreLib via reflection to init the EventSource -->
+      <method name="GetInstance" />
+    </type>
+  </assembly>
+</linker>

+ 8 - 0
XdCxRhDW.Framework/ILLink/ILLink.Descriptors.LibraryBuild.xml

@@ -0,0 +1,8 @@
+<linker>
+  <assembly fullname="System.Diagnostics.DiagnosticSource">
+    <type fullname="System.Diagnostics.Metrics.MetricsEventSource">
+      <!-- Used by System.Private.CoreLib via reflection to init the EventSource -->
+      <method name="GetInstance" />
+    </type>
+  </assembly>
+</linker>

+ 8 - 0
XdCxRhDW.Repostory/ILLink/ILLink.Descriptors.LibraryBuild.xml

@@ -0,0 +1,8 @@
+<linker>
+  <assembly fullname="System.Diagnostics.DiagnosticSource">
+    <type fullname="System.Diagnostics.Metrics.MetricsEventSource">
+      <!-- Used by System.Private.CoreLib via reflection to init the EventSource -->
+      <method name="GetInstance" />
+    </type>
+  </assembly>
+</linker>

+ 0 - 6
XdCxRhDW.WebApi/05.XdCxRhDW.WebApi.csproj

@@ -76,12 +76,6 @@
     <Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
       <HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
     </Reference>
-    <Reference Include="Serilog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
-      <HintPath>..\packages\Serilog.3.1.1\lib\net471\Serilog.dll</HintPath>
-    </Reference>
-    <Reference Include="Serilog.Sinks.File, Version=5.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
-      <HintPath>..\packages\Serilog.Sinks.File.5.0.0\lib\net45\Serilog.Sinks.File.dll</HintPath>
-    </Reference>
     <Reference Include="Swashbuckle.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd1bb07a5ac7c7bc, processorArchitecture=MSIL">
       <HintPath>..\packages\Swashbuckle.Core.5.6.0\lib\net40\Swashbuckle.Core.dll</HintPath>
     </Reference>

+ 3 - 4
XdCxRhDW.WebApi/FileController.cs

@@ -49,7 +49,7 @@ namespace XdCxRhDW.WebApi
             var filePath = Path.Combine(uploadFolder, fileName);
             if (File.Exists(filePath))
             {
-                Serilog.Log.Warning($"文件[{filePath}]已存在!");
+                return Error<string>($"文件[{filePath}]已存在!");
             }
             using (var fileStream = new FileStream(filePath, FileMode.Create))
             {
@@ -66,7 +66,7 @@ namespace XdCxRhDW.WebApi
         [HttpPost]
         public AjaxResult<int> DeleteFiles(FileDeleteDto dto)
         {
-            if(dto.Files==null||dto.Files.Count==0)return Success(0);
+            if (dto.Files == null || dto.Files.Count == 0) return Success(0);
             int count = 0;
             foreach (var fileName in dto.Files)
             {
@@ -79,9 +79,8 @@ namespace XdCxRhDW.WebApi
                         count++;
                     }
                 }
-                catch (Exception ex)
+                catch
                 {
-                    Serilog.Log.Error(ex, $"删除文件[{fileName}]失败!");
                 }
             }
             return Success(count);

+ 8 - 0
XdCxRhDW.WebApi/ILLink/ILLink.Descriptors.LibraryBuild.xml

@@ -0,0 +1,8 @@
+<linker>
+  <assembly fullname="System.Diagnostics.DiagnosticSource">
+    <type fullname="System.Diagnostics.Metrics.MetricsEventSource">
+      <!-- Used by System.Private.CoreLib via reflection to init the EventSource -->
+      <method name="GetInstance" />
+    </type>
+  </assembly>
+</linker>

+ 3 - 1
XdCxRhDW.WebApi/Startup.cs

@@ -289,7 +289,9 @@ namespace XdCxRhDW.WebApi
             public override void OnException(HttpActionExecutedContext context)
             {
                 if (context.Exception.GetType() != typeof(System.OperationCanceledException))
-                    Serilog.Log.Error(context.Exception, context.Exception.Message);
+                {
+                    Console.WriteLine(context.Exception);
+                } 
                 else
                     return;
                 base.OnException(context);

+ 0 - 2
XdCxRhDW.WebApi/packages.config

@@ -21,8 +21,6 @@
   <package id="Newtonsoft.Json" version="13.0.3" targetFramework="net472" />
   <package id="Newtonsoft.Json.Bson" version="1.0.2" targetFramework="net472" />
   <package id="Owin" version="1.0" targetFramework="net472" />
-  <package id="Serilog" version="3.1.1" targetFramework="net472" />
-  <package id="Serilog.Sinks.File" version="5.0.0" targetFramework="net472" />
   <package id="Swashbuckle" version="5.6.0" targetFramework="net472" />
   <package id="Swashbuckle.Core" version="5.6.0" targetFramework="net472" />
   <package id="System.Buffers" version="4.5.1" targetFramework="net472" />