mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 12:18:50 +02:00
Rewrite all log message format
This commit is contained in:
@@ -37,9 +37,9 @@ namespace Wox
|
||||
|
||||
private void OnStartup(object sender, StartupEventArgs e)
|
||||
{
|
||||
Stopwatch.Normal("Startup Time", () =>
|
||||
Stopwatch.Normal("|App.OnStartup|Startup cost", () =>
|
||||
{
|
||||
Log.Info("-------------------------- Begin Wox startup --------------------------");
|
||||
Log.Info("|App.OnStartup|Begin Wox startup ----------------------------------------------------");
|
||||
RegisterDispatcherUnhandledException();
|
||||
|
||||
var settingVM = new SettingWindowViewModel();
|
||||
@@ -62,7 +62,7 @@ namespace Wox
|
||||
AutoUpdates();
|
||||
|
||||
mainVM.MainWindowVisibility = _settings.HideOnStartup ? Visibility.Hidden : Visibility.Visible;
|
||||
Log.Info("-------------------------- End Wox startup --------------------------");
|
||||
Log.Info("|App.OnStartup|End Wox startup ---------------------------------------------------- ");
|
||||
});
|
||||
}
|
||||
|
||||
@@ -121,8 +121,7 @@ namespace Wox
|
||||
AppDomain.CurrentDomain.UnhandledException += ErrorReporting.UnhandledExceptionHandle;
|
||||
AppDomain.CurrentDomain.FirstChanceException += (s, e) =>
|
||||
{
|
||||
Log.Error("First Chance Exception:");
|
||||
Log.Exception(e.Exception);
|
||||
Log.Exception("|App.RegisterAppDomainExceptions|First Chance Exception:", e.Exception);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Threading;
|
||||
using NLog;
|
||||
using Wox.Infrastructure.Exception;
|
||||
using Wox.Infrastructure.Logger;
|
||||
|
||||
namespace Wox.Helper
|
||||
{
|
||||
@@ -10,7 +10,8 @@ namespace Wox.Helper
|
||||
{
|
||||
public static void Report(Exception e)
|
||||
{
|
||||
Log.Fatal(e);
|
||||
var logger = LogManager.GetLogger("UnHandledException");
|
||||
logger.Fatal(ExceptionFormatter.FormatExcpetion(e));
|
||||
new CrashReporter(e).Show();
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Wox.ViewModel
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Exception(e);
|
||||
Log.Exception($"|ResultViewModel.Image|IcoPath is empty and exception when calling Icon() for result <{Result.Title}> of plugin <{Result.PluginDirectory}>", e);
|
||||
return ImageLoader.Load(Result.IcoPath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,6 +113,10 @@
|
||||
<HintPath>..\packages\NHotkey.Wpf.1.2.1\lib\net35\NHotkey.Wpf.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.4.2.0\lib\net45\NLog.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="NuGet.Squirrel, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\squirrel.windows.1.4.0\lib\Net45\NuGet.Squirrel.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
@@ -307,7 +311,9 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<None Include="packages.config" />
|
||||
<None Include="packages.config">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="Themes\Light.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net452" />
|
||||
<package id="NHotkey" version="1.2.1" targetFramework="net452" />
|
||||
<package id="NHotkey.Wpf" version="1.2.1" targetFramework="net452" />
|
||||
<package id="NLog" version="4.2.0" targetFramework="net452" />
|
||||
<package id="NuGet.CommandLine" version="3.4.3" targetFramework="net452" developmentDependency="true" />
|
||||
<package id="PropertyChanged.Fody" version="1.51.0" targetFramework="net452" developmentDependency="true" />
|
||||
<package id="SharpZipLib" version="0.86.0" targetFramework="net452" />
|
||||
|
||||
Reference in New Issue
Block a user