NewLife/NewLife.Cube

修复ErrorModule中间件中logger因为formatter为空
xxred 编写于 2019-02-13 20:28:36
共计: 修改4个文件,增加66行、删除15行。
增加 +63 -0
修改 +1 -3
修改 +1 -11
修改 +1 -1
增加 +63 -0
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..1ff0c42
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,63 @@
+###############################################################################
+# Set default behavior to automatically normalize line endings.
+###############################################################################
+* text=auto
+
+###############################################################################
+# Set default behavior for command prompt diff.
+#
+# This is need for earlier builds of msysgit that does not have it on by
+# default for csharp files.
+# Note: This is only used by command line
+###############################################################################
+#*.cs     diff=csharp
+
+###############################################################################
+# Set the merge driver for project and solution files
+#
+# Merging from the command prompt will add diff markers to the files if there
+# are conflicts (Merging from VS is not affected by the settings below, in VS
+# the diff markers are never inserted). Diff markers may cause the following 
+# file extensions to fail to load in VS. An alternative would be to treat
+# these files as binary and thus will always conflict and require user
+# intervention with every merge. To do so, just uncomment the entries below
+###############################################################################
+#*.sln       merge=binary
+#*.csproj    merge=binary
+#*.vbproj    merge=binary
+#*.vcxproj   merge=binary
+#*.vcproj    merge=binary
+#*.dbproj    merge=binary
+#*.fsproj    merge=binary
+#*.lsproj    merge=binary
+#*.wixproj   merge=binary
+#*.modelproj merge=binary
+#*.sqlproj   merge=binary
+#*.wwaproj   merge=binary
+
+###############################################################################
+# behavior for image files
+#
+# image files are treated as binary by default.
+###############################################################################
+#*.jpg   binary
+#*.png   binary
+#*.gif   binary
+
+###############################################################################
+# diff behavior for common document formats
+# 
+# Convert binary document formats to text before diffing them. This feature
+# is only available from the command line. Turn it on by uncommenting the 
+# entries below.
+###############################################################################
+#*.doc   diff=astextplain
+#*.DOC   diff=astextplain
+#*.docx  diff=astextplain
+#*.DOCX  diff=astextplain
+#*.dot   diff=astextplain
+#*.DOT   diff=astextplain
+#*.pdf   diff=astextplain
+#*.PDF   diff=astextplain
+#*.rtf   diff=astextplain
+#*.RTF   diff=astextplain
修改 +1 -3
diff --git a/NewLife.CubeNC/Areas/Admin/Views/_ViewImports.cshtml b/NewLife.CubeNC/Areas/Admin/Views/_ViewImports.cshtml
index 6500a70..9e05a44 100644
--- a/NewLife.CubeNC/Areas/Admin/Views/_ViewImports.cshtml
+++ b/NewLife.CubeNC/Areas/Admin/Views/_ViewImports.cshtml
@@ -1,6 +1,4 @@
-@using NewLife.Cube
-@*@using NewLife.Cube.Models*@
-@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
+@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
 @using NewLife
 @using NewLife.Cube
 @using NewLife.Reflection
修改 +1 -11
diff --git a/NewLife.CubeNC/NewLife.CubeNC.csproj b/NewLife.CubeNC/NewLife.CubeNC.csproj
index 26fb8a1..06261fa 100644
--- a/NewLife.CubeNC/NewLife.CubeNC.csproj
+++ b/NewLife.CubeNC/NewLife.CubeNC.csproj
@@ -102,6 +102,7 @@
   <ItemGroup>
     <PackageReference Include="Microsoft.AspNetCore.App" />
     <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.1" />
+    <PackageReference Include="NewLife.XCode" Version="9.10.6965.42078" />
   </ItemGroup>
 
   <ItemGroup>
@@ -188,20 +189,9 @@
     <EmbeddedResource Include="wwwroot\favicon.ico" />
   </ItemGroup>
   <ItemGroup>
-    <Reference Include="NewLife.Core">
-      <HintPath>..\DLL20\NewLife.Core.dll</HintPath>
-    </Reference>
-    <Reference Include="XCode">
-      <HintPath>..\DLL20\XCode.dll</HintPath>
-    </Reference>
-  </ItemGroup>
-  <ItemGroup>
     <Content Update="Areas\Admin\Views\_ViewImports.cshtml">
       <Pack>$(IncludeRazorContentInPack)</Pack>
     </Content>
-    <Content Update="H:\Cache\Nuget\packages\newlife.xcode.test\9.8.6777.32318\contentFiles\any\netstandard2.0\Build.tt">
-      <Generator>TextTemplatingFileGenerator</Generator>
-    </Content>
   </ItemGroup>
   <Target Name="PostBuild" AfterTargets="PostBuildEvent">
     <Exec Command="md &quot;$(ProjectDir)..\..\Bin\netstandard2.0&quot;&#xD;&#xA;copy &quot;$(TargetDir)$(TargetName)&quot;.* &quot;$(ProjectDir)..\..\Bin\netstandard2.0\&quot; /y" />
修改 +1 -1
diff --git a/NewLife.CubeNC/WebMiddleware/ErrorModule.cs b/NewLife.CubeNC/WebMiddleware/ErrorModule.cs
index a6427ae..ef5db98 100644
--- a/NewLife.CubeNC/WebMiddleware/ErrorModule.cs
+++ b/NewLife.CubeNC/WebMiddleware/ErrorModule.cs
@@ -38,7 +38,7 @@ namespace NewLife.Cube.WebMiddleware
             catch (Exception e)
             {
                 XTrace.WriteException(e);
-                logger.Log(LogLevel.Error, 1, e, e, null);
+                logger.Log(LogLevel.Error, 1, e, e, (e1, e2) => e.ToString());
 
                 if (context.Response.HasStarted)
                 {