diff --git a/Wox.Core/Wox.Core.csproj b/Wox.Core/Wox.Core.csproj index d69ae6a8d6..f8d1129aef 100644 --- a/Wox.Core/Wox.Core.csproj +++ b/Wox.Core/Wox.Core.csproj @@ -27,7 +27,7 @@ pdbonly true - bin\Release\ + ..\Output\Release\ TRACE prompt 4 diff --git a/Wox.Infrastructure/Logger/Log.cs b/Wox.Infrastructure/Logger/Log.cs index 25527baefb..d911e5bcb2 100644 --- a/Wox.Infrastructure/Logger/Log.cs +++ b/Wox.Infrastructure/Logger/Log.cs @@ -1,4 +1,5 @@ -using NLog; +using System.Diagnostics; +using NLog; using Wox.Infrastructure.Exception; namespace Wox.Infrastructure.Logger @@ -12,7 +13,12 @@ namespace Wox.Infrastructure.Logger #if DEBUG throw e; #else - logger.Error(e.Message + "\r\n" + e.StackTrace); + while (e.InnerException != null) + { + logger.Error(e.Message); + logger.Error(e.StackTrace); + e = e.InnerException; + } #endif } diff --git a/Wox/App.config b/Wox/App.config index 55ab1e0d9d..c718ae367c 100644 --- a/Wox/App.config +++ b/Wox/App.config @@ -1,10 +1,5 @@ - - - - - diff --git a/Wox/App.xaml.cs b/Wox/App.xaml.cs index 5b239e0851..4e87e6a4db 100644 --- a/Wox/App.xaml.cs +++ b/Wox/App.xaml.cs @@ -42,7 +42,7 @@ namespace Wox } - [Conditional("DEBUG")] + [Conditional("RELEASE")] private void RegisterUnhandledException() { // let exception throw as normal is better for Debug diff --git a/Wox/Wox.csproj b/Wox/Wox.csproj index 7d46e6109a..3275ed7398 100644 --- a/Wox/Wox.csproj +++ b/Wox/Wox.csproj @@ -48,7 +48,7 @@ pdbonly true ..\Output\Release\ - TRACE + TRACE;RELEASE prompt 4 false @@ -364,7 +364,6 @@ cd "$(TargetDir)Plugins" & del /s /q NAppUpdate.Framework.dll cd "$(TargetDir)Plugins" & del /s /q Wox.Infrastructure.dll cd "$(TargetDir)Plugins" & del /s /q Wox.Infrastructure.pdb cd "$(TargetDir)Plugins" & del /s /q Newtonsoft.Json.dll -cd "$(TargetDir)Plugins" & del /s /q WindowsInput.dll )